Completed a 14.5hours Udemy course on Amazon Web Services / AWS. It took about two weeks to complete but is completely worth. So, along with Azure, I am adding AWS also in my list of confidence.
Microsoft Build 2020 – Highlights
Find my notes on Microsoft 2020 Build – virtual event, held on 19,20 & 21st May 2020.
Build Home – https://mybuild.microsoft.com/
Microsoft 365
- Fluid Framework – A new framework to build distributed web applications. (in preview) [Link]
- Project Cortex – Classify organization content using AI to topics. Knowledge base to improve employees’ organizational intelligence and productivity (in preview). Microsoft Graph based APIs will be available.[Link]
- Microsoft Lists – Will have templates for quick lists, color formatting, and the ability to create alerts, track issues, assets, routines, contacts, and inventory for companies [Link]
- Office Scripting [Link]
- Outlook – Compose email messages with text prediction
- Excel – New features – new capabilities, contextual experiences [Link]
- Misc. – Office Add-In debugger Extension for VS Code
Teams
- Teams to get customizable templates
- Easily create Chatbots
- Power Platform Integration
- Developers can build and publish Teams app using Visual Studio and VS Code
- Easy integration of custom apps and Power Apps using single click
- Share Power BI reports in Teams
- Schedule virtual appoints in Teams
- Broadcast events and create studio productions from virtual stage
Reference: [Link]
Power Platform
- Trying to bring in low-code RPA into Power Automate with the acquisition of Softomotive [Link]
- New “Add to Teams” experience
Azure
- Azure Synapse Link
- Bringing database services and analytics together in real time [Link]
- Azure ML
- New “responsible machine learning” tools in AML. This will help developers understand, protect and control their models throughout the machine learning lifecycle. [Link][Link]
- AI Supercomputer
- New infrastructure available in Azure to train extremely large AI models [Link]
- Azure Arc & Azure Stack Hub (updates)
- Azure Arc – For customers who want to simplify complex and distributed environments across on-premises, edge and multicloud, Azure Arc enables deployment of Azure services anywhere and extends Azure management to any infrastructure [Link]
- Azure Stack Hub – Azure Stack Hub broadens Azure to let you run apps in an on-premises environment and deliver Azure services in your datacenter [Link]
- Azure SQL Edge (in preview)
- Combines new capabilities such as data streaming and time series with in-database machine learning and graph features [Link]
- Azure Quantum
- One-stop-shop in Azure that gives you the freedom to create your own path to scalable quantum computing. [Link]
Developers
- Visual Studio Codespaces (formerly Visual Studio Online) [Link]
- Cloud-hosted, managed dev environments accessible from anywhere
- Project Reunion
- Unifying app development across the billion windows 10 devices [Link]
- Breaking the barrier between Win32 and UWP APIs.
- WSL / Windows Subsystem for Linux [Link]
- Support for Windows Subsystem for Linux 2 distros
- Run all Linux apps in WSL
- GPU support
- .NET
- C# 9 – preview is available [Link]
- Blazor
- WebAssembly is out of preview
- Microsoft Graph Services
- productivity-focused services powered by Microsoft 365 and Azure, that are designed specifically for developers who are building high-value applications [Link]
- Windows Package Manager
- Native Package Manager for Windows 10 (in preview) [Link]
Certifications
- Azure IoT Developer Specialty Certification
Misc.
- Microsoft Cloud for Healthcare
- Microsoft Cloud for Healthcare brings together trusted and integrated
capabilities for customers and partners that enrich patient engagement and
connects health teams to help improve collaboration, decision-making, and
operational efficiencies [Link] - New Microsoft Edge
Free Online Learning Due to Coronavirus – Free courses and resources
A good big list of free training courses and other resources – https://www.classcentral.com/report/free-online-learning-coronavirus/
AWS Whitepaper: Developing and Deploying .NET Applications on AWS
Here is a good read – https://d1.awsstatic.com/whitepapers/develop_deploy_dot_net_apps_on_aws.pdf
Create AWS Lambda function with .NET Core / C# and create a HTTP API Gateway trigger | Part #2
In this Part #2 of blog I will be creating a new .NET Core function in local machine and will upload to AWS using console interface. There are different ways you can develop and deploy but I will be talking in this blog only about the CLI way.
I am assuming you know how to create a Lambda function in AWS console already and if not, please read the Part #1 first.
Open the Command prompt and follow below steps:
Step 1: Install Lambda Templates for .NET Core
dotnet new -i Amazon.Lambda.Templates
Step 2: Create an empty function
dotnet new lambda.EmptyFunction –name MyTestLambdaFun
You should be able to see a folder structure like this is created.
under src\projectname you can see a Function.cs file which is our starting point.
Code will look like this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]
namespace MyTestLambdaFun
{
public class Function
{
/// <summary>
/// A simple function that takes a string and does a ToUpper
/// </summary>
/// <param name="input"></param>
/// <param name="context"></param>
/// <returns></returns>
public string FunctionHandler(string input, ILambdaContext context)
{
return input?.ToUpper();
}
}
}
Step 3 – Modify the code to return HTTP 200 status code.
It is necessary for lambda functions to return 200 status code, or else the function will work in AWS console when you “Test”, but the API Gateway endpoint will not.
After adding the StatusCode property, the function will look like this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Amazon.Lambda.APIGatewayEvents;
// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))]
namespace MyTestLambdaFun
{
public class Function
{
/// <summary>
/// A simple function that takes a string and does a ToUpper
/// </summary>
/// <param name="input"></param>
/// <param name="context"></param>
/// <returns></returns>
public APIGatewayProxyResponse FunctionHandler(ILambdaContext context)
{
return new APIGatewayProxyResponse
{
Body = "Hello Lambda, from Praveen",
StatusCode = 200
};
}
}
}
Do:
dotnet build
Now, if you are getting an error on APIGatewayProxyResponse, then you will have to install the dependency. Below command will help you:
dotnet add package Amazon.Lambda.APIGatewayEvents
(Refer to nuget page)
Try again dotnet build, and I am expecting to have the build succeeded.
Step 4 – Package the function
If you have not installed Lambda tools, then install it first:
dotnet tool install -g Amazon.Lambda.Tools
Then use the command:
dotnet lambda package
Notice the last line, you will get path to a zip file which you have to upload to AWS Lambda.
Step 5 – Upload the package to AWS console
Login to AWS Console and navigate to your lambda function. In this example I am going to use the same function we created in Part #1.
Scroll up and you should see a “Function Code” section like this:
Upload your ZIP file by clicking the upload button.
Next, you have to do one important task. Go to the source code folder again and open a file named “aws-lambda-tools-defaults.json”. You will have to copy the function-handler property value to the “Handler” textbox in “Function code” section.
Then click “Save” button.
Step 6 – Test the function
Click “Test”. You should see the test result like this: (Our function is not expecting an input parameter so you can create a dummy test event)
As a bonus, let us see how we can create a HTTP endpoint to this function.
Step 7 – Create API Gateway
Click “Trigger” button:
In the next screen, make these selections and click “Add”:
You will be redirected back to the dashboard. Scroll up and you will see a new section “API Gateway” with a new API endpoint URL. Use the link in browser to test.
Happy Lambda development!
You have noticed that I was rushing to finish the blog by not explaining in detail each step. I am leaving the rest to you as home work intentionally.
Refer to official .NET Core CLI documentation here.
Create AWS Lambda function with .NET Core / C# | Part #1
This blog explains how you can create an AWS Lambda function with .NET Core / C# as runtime.
Step 1 – Create function
Step 1.1 – Login to your AWS account, and select “Lambda from the services”
Step 1.2 – Click “Create Function”
Step 1.3 – Choose “Author From scratch”
There are advanced templates available, but I am keeping those out of the scope of this article.
Now fill,
- Function name
- Runtime, our case .NET Core (I am choosing the version .NET Core 3.1, which is the latest version when writing this article)
Click “Create function”
Usually it will take 10 to 15 seconds to get the function created. Once finished, you will be redirected to the Designer page.
Step 2 – Test the function
Step 2.1 – Configure test events – Select the test events drop down item
Step 2.2 – Fill in Event Name and enter some test input value (the built in template function is not expecting any input but we will require this when trying API Gateway in Part #2 blog) and click “Create”
Step 2.3 – Click “Test” button to test the function
Test result should show like this:
In Part #2 we will see how you can create a custom .NET Core function and deploy to AWS Lambda.
Clone/Copy SQL Server Database with timestamp in name
This script works on Azure SQL Database also.
DECLARE @cmd nvarchar(255) SET @cmd = N'CREATE DATABASE ' + CONCAT('MyDB_', REPLACE(REPLACE(REPLACE(CONVERT(VARCHAR(16), GETDATE(), 120), '-', ''),':',''),' ','_')) + ' AS COPY OF MyDB' EXECUTE sp_executesql @cmd
Beginner’s tutorial on creating a AWS Lambda function
This video is about a beginner’s tutorial on creating a basic AWS Lambda function with Node.js as runtime, and also create a public HTTP endpoint.
UNPIVOT in SQL
Below example converts rows to columns using UNPIVOT clause.
Assuming you have a table like this:
And you want to convert like this:
Use the query:
SELECT
ID, col, val
FROM
Table_1
UNPIVOT
(val for col in (col1, col2, col3)) p
You can also apply WHERE clause like this:
SELECT
ID, col, val
FROM
Table_1
UNPIVOT
(val for col in (col1, col2, col3)) p
WHERE id=1
Result:
Free – Data Science and Cognitive Computing Courses
Free and Earn Badges