Skip to content

Instantly share code, notes, and snippets.

@kunduso
Last active April 3, 2021 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunduso/1681cf3c766afd5611da9d14cddce01f to your computer and use it in GitHub Desktop.
Save kunduso/1681cf3c766afd5611da9d14cddce01f to your computer and use it in GitHub Desktop.
The aws cli to encrypt a s3 bucket
# bucket name: skundu-terraform-remote-state-two
aws s3api put-bucket-encryption --bucket skundu-terraform-remote-state-two --server-side-encryption-configuration "{\"Rules\": [{\"ApplyServerSideEncryptionByDefault\":{\"SSEAlgorithm\": \"AES256\"}}]}"
# no output if bucket encryption is successfully applied
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment