question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stop storing S3 bucket Lambda deployment information under Git

See original GitHub issue

Is your feature request related to a problem? Please describe.

When you work in a team on a project with multiple Amplify envs, you merge code from multiple developers in a main branch (at some point). The problem is that the Git history and the code reviews are polluted by changes done when switching environment instead of real code changes. To be more specific, all the CloudFormation scripts under amplify/backend/functions/XXX contains section like this:

"Code": {	
	"S3Bucket": "blabla-env-123456-deployment",
	"S3Key": "amplify-builds/blabla-1234567890123456-build.zip"	
},

Because the S3Key and S3Bucket is different for all env (and the S3Key even change between push) these value change all the time creating a lot of fuzz in the Git commits.

Describe the solution you’d like

I like to have the Amplify CLI dynamically injecting that information when pushing and removing the hardcoded values from the CloudFormation files. Like having:

"Code": {	
	"S3Bucket": "DO-NOT-CHANGE-UPDATED-BY-AMPLIFY-CLI",
	"S3Key": "DO-NOT-CHANGE-UPDATED-BY-AMPLIFY-CLI"	
},

And if the Amplify CLI needs to store the information about those URLs please use team-provider-info.json for information that remains and a file that is under .gitignore for the information that changes at every push.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:19
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
ammarkarachicommented, Sep 23, 2020

@xavierraffin Thanks for feature request this looks like there is some room for improvement I will mark this as an enhancement.

3reactions
r0zarcommented, Nov 18, 2020

I agree this is an enhancement.

@ammarkarachi do you know who’s working this at the moment? I wouldn’t mind picking it up if it’s looking for an owner.

I’d also be interested to chat on the ideal solution. Resolving the S3Bucket seems straightforward considering it already present in team-provider-info.json. The S3Key leaves a little to be improved on, considering it would be nice to generate only 1 hash for the entire build, and use that for all lambdas. Interested in your thoughts on this one. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot deployment issues in Lambda
Learn how to troubleshoot common deployment issues in Lambda. ... To upload a larger file, store it in Amazon S3 and use the...
Read more >
Deploying to AWS
You can disable creation of default S3 bucket policy by setting skipPolicySetup under deploymentBucket config. It only applies to deployment bucket that is ......
Read more >
Serverless Lambda deployment tutorial
This quickstart shows you how to deploy a Serverless Lambda application to AWS Lambda using Harness. We'll use a publicly-available ...
Read more >
aws_lambda_function | Resources | hashicorp/aws
Due to AWS Lambda improved VPC networking changes that began deploying in September 2019, EC2 subnets and security groups associated with Lambda Functions...
Read more >
Environments and deployments - GitLab Docs
When the job runs, the environment and deployment are created. Some characters cannot be used in environment names. For more information about the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found