When amplify publish starts, it builds and uploads files to s3, but doesn't delete the actual S3 bucket content, so we end up after a month of updates with a bucket with over hundreds and hundreds of files,
Describe the solution you'd like
Before the Amplify uploads files, delete everything in the bucket.
Describe alternatives you've considered
i do aws s3 rm s3://bucket --recursive before the amplify publish -c
@Temkit We've considered this and we decided not to delete S3 bucket contents by default from users S3 bucket since it might contain sensitive data which the CLI might delete and which won't be recoverable later on.
What we can do is provide a flag to do so as a part of the publish command which would first delete the contents of the S3 buckets before the next publish. I'll mark this as a feature request.
@kaustavghosh06 - is the flag you mention available ?
Most helpful comment
@Temkit We've considered this and we decided not to delete S3 bucket contents by default from users S3 bucket since it might contain sensitive data which the CLI might delete and which won't be recoverable later on.
What we can do is provide a flag to do so as a part of the publish command which would first delete the contents of the S3 buckets before the next publish. I'll mark this as a feature request.