aws / copilot-cli

The AWS Copilot CLI is a tool for developers to build, release and operate production ready containerized applications on AWS App Runner or Amazon ECS on AWS Fargate.
https://aws.github.io/copilot-cli/
Apache License 2.0
3.48k stars 401 forks source link

Files are not removed if new source does not contain them with static site service #5025

Open yannickvr opened 1 year ago

yannickvr commented 1 year ago

Using the Static Site Service, when I remove files from source, they are not removed from the destination.

Is this as designed, assuming files are never removed, only updated, or should this be a feature that's added to the roadmap?

The current state machine that handles the copy actions could be extended to delete files that do not exist in a manifest of files, so we don't have to scan S3 for objects that are not in the new source artifact.

E.g. current.manifest

- index.html
- myfile.html

new.manifest

- index.html
- mynewfile.html

compare of the two should initiate a delete of myfile.html

huanjani commented 1 year ago

More great feedback! Thanks, @yannickvr.

bobygnol commented 7 months ago

Hi @huanjani ! Quick question: Is there a plan to add a feature for automatically deleting old files in the Static Site Service ? Using Angular as an example, we're ending up with a lot of unused hashed bundles after each deploy.

Thanks!