Skip to content

Instantly share code, notes, and snippets.

@BenSlabbert
Created April 8, 2020 06:43
Show Gist options
  • Save BenSlabbert/ceac39c7910be8ea4937c528f6c2d161 to your computer and use it in GitHub Desktop.
Save BenSlabbert/ceac39c7910be8ea4937c528f6c2d161 to your computer and use it in GitHub Desktop.
If you are using customer managed KMS keys for encrypting data on S3 you must then specify the server-side-encryption option
#!/bin/bash
# MUST specify --server-side-encryption aws:kms if you are using customer managed
# encryption keys. Not needed if using S3 default encryption keys
aws s3api put-object --bucket bucket --key objectKey --body /path/to/file --server-side-encryption aws:kms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment