Skip to content
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

[FR]: Prevent object overwrites in S3 with s3_sync #84

Open
Pryz opened this issue Oct 22, 2024 · 0 comments
Open

[FR]: Prevent object overwrites in S3 with s3_sync #84

Pryz opened this issue Oct 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Pryz
Copy link

Pryz commented Oct 22, 2024

What is the current behavior?

Today s3_sync uses aws s3 cp (https://github.com/aspect-build/rules_aws/blob/main/aws/private/s3_sync.sh#L98) to copy the artifacts over to the S3 bucket.

Describe the feature

When using s3_sync to push releases to S3, it might be beneficial to prevent object overwrites. Now that S3 has pre-condition, it is possible to make sure that overwrites can't happen (see https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-writes.html for more details).

Replacing s3 cp by s3api put-object or s3api complete-multipart-upload with --if-none-match "*" would prevent to overwrite artifacts pushed to S3, bringing an additional layer of safety.

@Pryz Pryz added the enhancement New feature or request label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant