This project demonstrate the usage of AWS Lambda Web Adaptor to run a node.js api.
-
Create a new ECR
-
Build and push the Docker image
-
Create a new Lambda function
- Choose
Container image
and use the ECR image URI you pushed above - Enable Lambda function URL to test out the REST api
- Choose
Auth type
toNONE
- Choose
Invoke mode
toRESPONSE_STREAM
- Set this environment variable: Name
AWS_LWA_INVOKE_MODE
, valueresponse_stream
- Enable CORS
- Choose
- Choose
-
Additionally, you can leverage the crypteia lambda extension to autoload environment variables from SSM parameter store