Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Support for lambda source from S3 #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rafaelfelix
Copy link

this patch enables the module to allow defining the lambda function code from an s3_bucket and key, instead of locally.

@raymondbutcher
Copy link
Contributor

Unfortunately I think this needs an s3 variation for all Lambda function resources, not just the first one.

  • Done:
    • lambda_s3
  • Missing:
    • lambda_with_dl_s3
    • lambda_with_vpc_s3
    • lambda_with_dl_and_vpc_s3

(not sure about those names)

The main purpose of this module is to handle the Lambda packaging process for you. I'm not sure if I would use this module if using pre-built packages. I suppose the IAM policy resources are still somewhat useful.

So is it worth adding 4 copies of the Lambda resource to get this feature? I'm not sure.

@rafaelfelix
Copy link
Author

@raymondbutcher thanks for taking the time and reviewing this PR. The reason why this change is useful to me is, I want to manage the creation of the lambda resources using terraform (and your module does that quite nicely), while managing the deployment of the actual code from a CI/CD pipeline (as it fits better in the workflow my team is used to). For that purpose, fetching the source code from S3 is the only way to keep consistency when applying terraform by redeploying the last version of the artifact created by the pipeline.

Now, given the motivation for the change I'm proposing (sorry not to have done this before, should have been more clear about it in the PR description), I can create these variations you requested in order to get it through. Shall I do it?

Rafael Felix Correa added 2 commits February 21, 2019 17:16
this patch enables the module to allow defining the lambda function code from an s3_bucket and key, instead of locally.
so they're not considered mandatory even when  is
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants