- Newest
- Most votes
- Most comments
If you are using a custom runtime with Lambda, you need to upload the bootstrap file as part of the code package. There is not a way to grab an external bootstrap file. All Lambda code needs to be self-contained within the zip file. You can just add the bootstrap file to your code .zip archive. However, it may be simpler to split apart your code artifact and the custom runtime by using a Lambda Layer. You create a Lambda layer, which is just another zip archive, and then attach it to one or many Lambda functions. You can see the layer example in the doc you shared. https://docs.aws.amazon.com/lambda/latest/dg/runtimes-walkthrough.html#runtimes-walkthrough-function. In Cloudformation, you can only specify the function code inline for Node.js and Python. Have you looked at AWS SAM, this is a handy transform for CloudFormation which makes it much easier to package up layers and functions? It builds the zip files and uploads them; you don't need to manage S3 buckets. https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/building-layers.html
Relevant content
- Accepted Answerasked a year ago
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 months ago