VSCode Extension
Deploy and invoke Lambda functions in LocalStack directly from VSCode
less than a minute
Introduction
LocalStack VSCode Extension supports deploying and invoking Python Lambda functions through AWS SAM or AWS CloudFormation.
Prerequisites
- VS Code
samlocal
command line wrapper around the AWS SAM CLI for use with LocalStack.- LocalStack running in the background.
Getting Started
You can use a sample project to get started with the extension. The sample project contains a simple Lambda function and a SAM template. Clone the repository and open the project in VSCode.
$ git clone https://github.com/joe4dev/lambda-python.git
$ cd lambda-python
$ code .
Install the LocalStack VSCode Extension as recommended by the project.
You can now open the Python handler function under app/hello_world.py
.
Click the CodeLens Deploy Lambda function, select the template.yaml
, and choose a stack name such as my-stack
.
Click the CodeLens Invoke Lambda function and pick the stack name my-stack
and the function hello-world-function
.
Current Limitations
- The CodeLens for Deploy Lambda function always appears at the first line of each Python file.
- Invoke Lambda function currently only works in the region
us-east-1
and with an empty payload.