Support for nested lambda function deployment (packaging and upload to s3) as part of CF template
Is your feature request related to a problem? Please describe.
We have a lot of custom AWS Config rules backed by custom lambdas. These lambda functions are written in python but instead of writing it inline inside CloudFormation template, we have a need to define them in folder and be able to package them in s3 and dynamically deploy as part of cloud-formation. Currently manifest file does not support 'aws cloudformation package' command. If there are other options, please let me know. Our goal is to use CT without customizing the AWS provided solution unless required
Describe the feature you'd like
Support for lambda packaging as part of manifest definition or something along these lines
Additional context
Thanks for your feedback. We have added this to our backlog.
We worked around this by modifying our pipeline to include a "preprocessor" stage which takes care of creating the Lambda zips based on directories in the repo..
But I'd prefer to not have deviated.
@cacack
We worked around this by modifying our pipeline to include a "preprocessor" stage which takes care of creating the Lambda zips based on directories in the repo..
But I'd prefer to not have deviated.
Can you provide details how you hooked the preprocessor into the existing CodePipeline?
Not sure how cacack managed this, but one way is to:
- Set the customization pipeline to trigger from S3 instead of Git
- Create a pre-processor pipeline that runs prior to the customization pipeline that triggers from Git and outputs a zip to S3 to trigger the customization pipeline. Do anything you need to in this pipeline.
@ryanash999 our solution was something like this:
- Created an S3 bucket to house the Lambda zips
- Located all of our Lambda functions into unique directories housed in a subdirectory in the repo.
- Created a CodeBuild project which essentially walked the directories, zipping them individually and uploading to S3.
- Modified the CfCT CodePipeline to call our Preprocess stage before the Build stage.
- Updated our CfCT templates to reference the S3 URL for the given Lambda.