aws-solutions / aws-control-tower-customizations

The Customizations for AWS Control Tower solution combines AWS Control Tower and other highly-available, trusted AWS services to help customers more quickly set up a secure, multi-account AWS environment using AWS best practices.
https://docs.aws.amazon.com/controltower/latest/userguide/cfct-overview.html
Apache License 2.0
356 stars 205 forks source link

Support for nested lambda function deployment (packaging and upload to s3) as part of CF template #82

Open rohit3d2003 opened 2 years ago

rohit3d2003 commented 2 years ago

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

deolank commented 2 years ago

Thanks for your feedback. We have added this to our backlog.

cacack commented 2 years ago

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.

ryanash999 commented 1 year ago

@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?

rjenks commented 1 year ago

Not sure how cacack managed this, but one way is to:

cacack commented 1 year ago

@ryanash999 our solution was something like this:

mdaehnert commented 1 year ago

We saw same need for more deployment capabilities and built a solution on top of CfCT with support for AWS SAM. It means you can now easily develop with SAM features like packaged lambdas and deploy them via CfCT. Feel free to have a look at our AWS Blog Post and GitHub repo for more details.