This is an example repo of a lambda with a layer generated using the two template repos:
The layer is code to fetch an array of SSM secrets and the lambda uses this to return a test secret
This repo is only intended to be used a reference to a complete version of using the two templates
- To see how to configure your own versions see the two templates above
Assuming you have your AWS credentials set up (if not see here)
git clone git@github.com:robcronin/lambda-with-layer-example.git
- Add a secret to your paramter store with key
test_secret
- Deploy layer:
cd access-ssm
yarn
yarn deploy
cd ..
- Deploy lambda:
cd lambda-with-ssm-layer
yarn
yarn deploy
- Try out the lambda endpoint returned and it show the value of your
test_secret