question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(lambda): Provide a way to provision secrets in lambdas similar to ECS

See original GitHub issue

The Question

Hi, what is the recommended way to provision secrets in lambda functions?

I was looking at the definition of the DockerImageFunction and was hoping to find a secrets property similar to ContainerDefinition in ECS module but did not see anything like that, only environment.

AWS docs seem to indicate that this is possible through Cloudformation, though I might be missunderstanding?

Another option is to store passwords in AWS Secrets Manager secrets. You can reference the secret in your AWS CloudFormation templates to set passwords on databases. You can also set the value of an environment variable on the Lambda function. For an example, see the next section. 

Environment

  • CDK CLI Version: 1.77.0 (build a941c53)
  • Module Version: 1.77
  • Node.js Version: v14.14.0
  • OS: Docker Alpine on MacOS Big Sur
  • Language (Version): Typescript

Thank you!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:11
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cbackascommented, Jun 15, 2022

@nija-at can you point to the new documentation how to provision secrets in lambda similar to ECS?

@schlichtanders Has there been an announcement or something to indicate that the docs would be different? Afaik nothing has changed and nija-at’s statements are all still true.

0reactions
schlichtanderscommented, Jun 13, 2022

@nija-at can you point to the new documentation how to provision secrets in lambda similar to ECS?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use AWS Secrets Manager secrets in AWS Lambda functions
You can use the AWS Parameters and Secrets Lambda Extension to retrieve and cache AWS Secrets Manager secrets in Lambda functions without using...
Read more >
Injecting Sensitive data as Environment Variables to Lambda ...
We are used to injecting sensitive environment variables into ECS tasks via Secrets Manager like this but, we are searching for a similar...
Read more >
Using ECS tasks on AWS Fargate to replace Lambda functions
The lambda function is responsible for triggering the ECS task to start up with all the correct configuration. We need to provide a...
Read more >
How to use secrets manager in AWS Lambda( Node JS )
AWS secrets manager is nothing but a locker where you can keep all secret values like important papers, jewellery ( all important secret...
Read more >
Managing Secrets for AWS Lambda - Scratchpad
The secret is encrypted with a key managed by KMS. The resulting encrypted data is then provided to the Lambda function as an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found