AWS Lambda Secrets Manager with PowerTools

Lambda function using PowerTools → Secrets Manager

Lambda function that uses PowerTools to get Secrets Manager secret and call an API.

This pattern creates an AWS Lambda function to call a protected API endpoint using an API Key retrieved using Lambda Powertools from AWS SecretsManager. It is deployed with the AWS Cloud Development Kit (AWS CDK) in Python.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd lambda-powertools-secretsmanager-cdk

Deploy

cdk deploy --all


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk destroy --all.

Additional resources

Created by:

Luke Viens

Cloud application developer at AWS.

Sakthivel Chellapparimanam

AWS - Cloud Application Architect

Follow on LinkedIn