-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amplify updates lambda CFN templates on each push #3068
Comments
@artyom-melnikov The S3Key and Bucket needs to change whenever there is an update in your |
No i don't see this behavior when code is not changed. I see this when i'm initing new env. My team use amplify end each team member has own dev environment. Therefore each one of us has different S3Key and S3Bucket params and we have issues storing this templates in git because of that |
@artyom-melnikov Yes, we're aware of this. This wouldn't cause any issues deploying since the keys are generated dynamically on each push. We are looking at a solution where we build the S3Key based on the hash code of the |
Any progress? This problem is really annoying! |
Is there an RFC that would provide guidance to the community if the core dev team is not prioritizing this? |
A cdk provider for amplify, where the amplify implementation used the |
@renebrandel this needs attention. How about building a docker image of the lambda artifact to know if any change occurred rather than always bundling the lambda for each deploy. Also, the artifact path should be passed to the stack as a parameter, not by modifying the template. |
This continues to be an issue and I believe the fix is straightforward. As the OP mentioned, the problem is the function cloudformation stacks have the following section automatically overwritten on an environment change (i.e.
Note: this happens even if the function's code is identical in both environments (this is the key annoyance). The bucket-name, in particular, is different for each environment. It follows the same naming convention as the main stack name, which is something like I have noticed that the Solution
The one part I'm not sure about is where I have If the above could be done, I think this would solve the issue because then the only time the stack would need to change is if the code was modified. It would no longer change just because of switching environments. |
As someone who switches environments often, this would speed up deployments. |
cc @edwardfoyle for multi-env refactor visibility |
When creating lambda functions through
amplify function add
amplify creates CloudFormation template. This template is meant to be stored in the git repository (because it describes lambda and can have manual changes). The problem is that on eachamplify push
this file is modified with the following lines:Later you need to either manually rollback files in git or resolve merge conflicts for those lines which makes no sense.
I propose to not update those files and perform all generation in the temp files
The text was updated successfully, but these errors were encountered: