AWS CLI

Package and Upload a Lambda Function with the AWS CLI

The AWS console is great for creating, modifying and visualizing your AWS resources, services and infrastructure. However, if you need automation and repeatability, the AWS CLI is where it’s at.

For this tutorial, we’ll use .NET as the reference technology. Although, most of this tutorial can be used with other languages like, Python, Node.js, Go, etc. When you see references to .NET, feel free to swap in your programming language of choice.

Create a .NET AWS Lambda Function with an HTTPS Endpoint

Get all the code on GitHub.

AWS Lambda, the popular AWS service, has been the solution behind many microservices. Some even argue that AWS Lambda enabled the microservice trend over the last five to seven years. And, the serverless/AWS Lambda trend does not show any signs of slowing down.

Even with its popularity, there was always one missing ingredient, a URL that could directly invoke the AWS Lambda function. Some could argue that this could be accomplished through the use of AWS API Gateway along with AWS Lambda. Although, what if you don’t need everything that AWS API Gateway gives you? Or, what if you don’t want or need the hassle of AWS API Gateway? And, maybe, you’re just looking for a checkbox in the AWS Console for the Lambda configuration that enables a URL for the function? If this sounds like you, then the wait is over, because that’s just the feature that AWS recently announced for Lambda.

Create an SQS Queue and an SNS Topic and Subscription using the AWS CLI

AWS gives engineers many ways to accomplish many tasks. Here we will look at creating both a Simple Notification Service topic as well as a Simple Queue Service queue and then creating an SNS subscription “linking” the two. All the while, we will exclusively use the AWS CLI to accomplish the task. This exercise could also be carried out in  the AWS console as well as one of the AWS SDKs and if you are proficient in an AWS SDK or the console, feel free to use one of those tools to view the changes being made while we move through this solution.