If anyone has worked with AWS Lambda, you will find IDE is not developer friendly and has poor UI. It's hard to make code changes in the code and test from the present IDE. On the top of the if you don't want to use AWS based CI/CD services, automated deployment can be a bit challenging being a developer. You can use Terraform or Github actions now but AWS came up with another better option to deploy and test code AWS Lambda code.
Considering these challenges, AWS Lambda recently announced Visual Studio integration feature, which is a part of AWS toolkit. It will make it easier for the developers to push, build, test and deploy the code. This integration feature option using Visual Studio
Although, it still has restriction to use 50 MB code size but it now provides a better IDE experience similar to what visual studio will be on your localhost. This include dependencies installation with extension, split screen layout, writing code and running test events without opening new windows, live logs from CloudWatch for efficient debugging. In addition, Amazon Q's in the console can be used as a coding assistant similar to co-pilot. This provides better developer experience.
To start using Visual studio for AWS Lambda:
- You should have Visual Studio locally installed. After that, install AWS toolkit from marketplace. You will see webpage will redirect to visual studio and open this tab. You can go ahead and install this.
- After installing AWS toolkit, you will see AWS logo on the left sidebar under extensions. Click on that.
- Now, select the option to connect with your AWS account.
- After successful connection. You will get a tab to invoke Lambda function locally. As you can see below, this option require AWS SAM installed to invoke Lambda locally.
It will also pull all your Lambda functions from AWS account after login. If you want to update those, you can right click on Lambda function, select upload Lambda and it will ask you for the zip file of Lambda function.
or you can select samples from explorer option in the left sidebar, If you want to go with remote invoke, you can click on any Lambda functions visible to you from the sidebar.
- If you want to create your own Lambda function and test the integration, you can click on Application Builder option and select AWS CLI or SAM.
If you want the Lambda code to deploy to the AWS account, you can select last option as shown in above screenshot. After that if you logged into AWS account, you will be asked to Login.
Then, it will let you deploy AWS code.
This way, you can easily deploy AWS code now from your IDE itself which can be convenient for developer testing.
- If you want to create your own Lambda function and test the integration, you can click on Application Builder option and select AWS CLI or SAM.
If you want the Lambda code to deploy to the AWS account, you can select last option as shown in above screenshot. After that if you logged into AWS account, you will be asked to Login.
Then, it will let you deploy AWS code.
This way, you can easily deploy AWS code now from your IDE itself which can be convenient for developer testing.
Top comments (0)