aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
460 stars 116 forks source link

Amplify triggers deploying CloudFront again when not neccessary #3154

Closed entest-hai closed 1 year ago

entest-hai commented 1 year ago

Before opening, please confirm:

App Id

d38q1ys9oywejq

AWS Region

us-east-1

Amplify Hosting feature

SSR

Describe the bug

I have noticed that Amplify hosting trigger deploying CloudFront though there are no changing in static files. Let me explain

  1. I only change a few line of code and there is no any change about static files in S3 and CloudFront
  2. Then Amplify still trigger CloudFront to re-deploy again

Expected behavior

  1. Amplify should not trigger CloudFront re-deploy again when not necessary
  2. Amplify should use CloudFront Invalidation for specific static file change

This will help the overall build time faster

Reproduction steps

  1. Create a new Amplify SSR hosting
  2. Deploy
  3. Modify README and commit a code change, do not change any static files which will be stored in CloudFront
  4. Go to CloudFront and see it is re-deploying. This is not necessary and case long build time in overall

Build Settings

No response

Log output

``` # Put your logs below this line ```

Additional information

No response

ghost commented 1 year ago

Hi @entest-hai 👋🏽 Thanks for raising this issue. If you would like to skip builds for commits where the changes do not affect the website, you can add [skip-cd] at the end of the commit message. See Skip build for a commit. This will prevent the builds from being triggered for that specific commit.

If you would also like to take advantage of faster build times, we've recently launched support for Next.js 12 and 13. With this support, Next.js apps deploy 3x faster. Please see: https://aws.amazon.com/about-aws/whats-new/2022/11/aws-amplify-hosting-support-next-js-12-13/

github-actions[bot] commented 1 year ago

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.