ryands17 / lambda-ssm-cache

Cache SSM Paramter Store values in Lambda via CDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSM Paramter Store caching with Lambda

The setup is inspired by this blogpost.

Steps

  1. Create a cdk.context.json file in the root of this project with the regtion (optional).
{
  "region": "us-east-1"
}
  1. Run yarn (recommended) or npm install

  2. Run yarn deploy to deploy the stack to your specified region. You can add a custom profile name if it is not default. You can learn about creating profiles using the aws-cli here.

  3. 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.

Useful commands

  • yarn build compile typescript to js
  • yarn watch watch for changes and compile
  • yarn test perform the jest unit tests
  • yarn cdk deploy deploy this stack to your default AWS account/region
  • yarn cdk diff compare deployed stack with current state
  • yarn cdk synth emits the synthesized CloudFormation template

About

Cache SSM Paramter Store values in Lambda via CDK


Languages

Language:TypeScript 90.6%Language:JavaScript 8.2%Language:Shell 1.2%