- AWS CLI
- AWS SAM CLI
- Node.js
- Docker
- Esbuild
IMPORTANT: esbuild must be installed in the host machine, not as a dependency of the project. I.e: in Debian run
npm install -g esbuild
.
Authenticate to AWS through the AWS CLI:
aws configure
Create the .env
files with all the required parameters:
Region
Env
sam build
sam local invoke {FUNCTION_NAME} \
-e events/{FUNCTION_EVENT}.json \
--parameter-overrides $(cat .env)
# dev
aws s3api create-bucket \
--bucket order-status-update-dev \
--region sa-east-1 \
--create-bucket-configuration LocationConstraint=us-east-2
# dev
sam deploy \
--config-file ./samconfig.toml \
--config-env dev \
--parameter-overrides $(cat .env.dev)