Our great sponsors
-
serverless-application-model
The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.
-
aws-lambda-java-libs
Official mirror for interface definitions and helper classes for Java code running on the AWS Lambda platform.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
An example in a SAM template can look like this:
Below I'll discuss some ways we can make them available in our Lambda functions. I'll refer to passwords, connection URLs, and API keys as secrets in the rest of this writing to be brief.
Although I'll use Lambda functions in the examples, we can transfer the concepts to other compute resources, like EC2 instances, and ECS or EKS containers.
We can add dynamic references to our CloudFormation templates. This way, the secret's value will be available at deployment time. We can store it as an environment variable in the function code.
We can do the same with CDK: