2 Answers
- Newest
- Most votes
- Most comments
2
There might be couple of options -
- Use persistent storage, such as EFS, S3 or /tmp directory in certain scenarios;
- Refactor and leverage ENV in dockerfile, for exmaple;
- (Strongly Recommended) Refactor and use SSM Parameter Store or Secret Manager.
answered 3 years ago
0
In addition to Jason_S's answer:
- Make use of AppConfig - AWS service for managing and deploying configurations
answered 3 years ago
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
Hi - Just to clarify, your main concern is don't want to rebuild the Lambda custom image that is part of a Cfn custom resource? If so, is it possible to have your Lambda function in a separate CloudFormation template and reference the ARN? Also where is the config file you are referring to stored right now?
Thanks for the answers. I have a follow-on question please. I am using a cloudformation custom resource to invoke this lambda whenever there is changes to my config file. In other words it is invoked whenever the custom resource is created, updated, or deleted, AWS Cloud formation calls this lambda. Each invocation of this lambda will use a different config. I have to make this config accessible to this lambda created in the cdk. It is a large config file, I cannot put contents of this config into env variables
So, my current situation is I have a custom resource defined like this.
Whenever the
properties.configList
changes the lambda function is invoked when I runcdk deploy
. If there are no changes to theconfigsList
then the lambda is not called. This is working well when my lambda is a nodejs function.But now my lambda is a container that I need to run and supply this
configsList
to it as a file. I am unable to figure out a way to do this.