The setup is inspired by this blogpost.
- Create a
cdk.context.json
file in the root of this project with the regtion (optional).
{
"region": "us-east-1"
}
-
Run
yarn
(recommended) ornpm install
-
Run
yarn deploy
to deploy the stack to your specified region. You can add a custom profile name if it is notdefault
. You can learn about creating profiles using the aws-cli here. -
You can now test the Lambda from the console by creating a test event and notice Lambda use the execution context to cache Paramter Store values.
yarn build
compile typescript to jsyarn watch
watch for changes and compileyarn test
perform the jest unit testsyarn cdk deploy
deploy this stack to your default AWS account/regionyarn cdk diff
compare deployed stack with current stateyarn cdk synth
emits the synthesized CloudFormation template