Aws Lambda On Visual Studio

The AWS Toolkit for Visual Studio includes AWS Lambda.NET Core project templates for Visual Studio. Use the templates to quickly develop and deploy.NET Core-based C# Lambda functions. The AWS Lambda Deployment adds a task to easily enable build or release pipelines in VSTS to work with AWS Lambda Functions. It is free and open source plugin! The task include a new service endpoint type AWS, to supply AWS credentials to the tasks at runtime (If you have the AWS Tools for Microsoft Visual Studio Team Services (VSTS) plugin.

The AWS Lambda Deployment adds a task to easily enable build or release pipelines in VSTS to work with AWS Lambda Functions. It is free and open source plugin!

  1. Publishing to AWS. Deploying this code is a straightforward task: from the solution explorer in Visual Studio, right-click the solution name and select “Publish to Lambda AWS” from the menu. You'll see the window below: The account profile is the same profile created using the user access and secret keys.
  2. With Visual Studio, you can install AWS's AWS.NET Mock Lambda Test Tool. Use the following command in the same directory as your Solution file: dotnet tool install -g Amazon.Lambda.TestTool-2.1 Visual Studio automatically adds a Debug configuration so you can debug the project just like you would any other.NET app.
  3. Define, configure and deploy AWS Lambda function based on C#.Net Core, set permissions and learn how to use AWS Visual Studio toolkit. Launch a C#.NET Core Lambda Function — Step by Step.
Aws lambda visual studio

The task include a new service endpoint type AWS, to supply AWS credentials to the tasks at runtime (If you have the AWS Tools for Microsoft Visual Studio Team Services (VSTS) plugin installed, you can use the already configured endpoints).

Highlighted Features

Aws Lambda Visual Studio Debug

Create an AWS Credentials Connection

To work with AWS Lambda services an AWS subscription has to be linked to Visual Studio Team Services using the Services tab in the Account Administration section. Add the AWS subscription to use in the Build or Release Management definition by opening the Account Administration screen (gear icon on the top-right of the screen) and then click on the Services Tab.

Select the AWS endpoint type and provide the following paramters

  • A name used to refer to the credentials when configuring tasks that require AWS credentials (Like)
  • AWS Access Key ID
  • AWS Secret Access Key

The AWS Lambda subscription needs some extra grant to use all features of plugin

  • IAM:
    • iam:PassRole
  • VPC:
    • ec2:CreateNetworkInterface
    • ec2:DescribeNetworkInterfaces
    • ec2:DeleteNetworkInterface
Aws Lambda On Visual Studio

Please refer to About Access Keys. Note that we strongly suggest the use of access and secret keys generated for an Identity and Access Management (IAM) user account.

Deploy Serveless Applications

Create or update a Lambda Function. This mode only modifies the last version of the function ($LATEST). You can set an alias to invoke this version.

Publish a Version

Aws Lambda Visual Studio Code

Publish a new version of the Lambda Function, based on the state of the latest version ($LATEST). You can set an alias to invoke this version.

Please refer to Lambda Versioning and Aliases for more information.

Reporting issues

Aws Lambda Visual Studio

Check out the Github issues directly.

Minimum supported environments

Aws Lambda Visual Studio 2017

  • Visual Studio Team Services