AWS - S3 with Customer Managed Keys

 

In this post, We will see how to create a KMS key and use that key to encrypt the S3 bucket. We will see what happens when uploading an object without the key, with default encryption key, and with the KMS key which we created.

Let's create a KMS key.










Now that we have the key. Let's use that key for S3 bucket encryption.



Now that we have a bucket. Updating bucket policy as below and trying to upload the object.



The above policy will deny uploading to the S3 when the Server Side Encryption is not "AES256".

I am trying to upload with the default S3 encryption key and it fails.


So, We are using AWS KMS. To upload the objects using customer KMS we need to upload the policy as below.



Let's upload again.




It works.








Comments

Popular posts from this blog

SRE/DevOps Syllabus

AWS Code Commit - CI/CD Series Part 1

Docker - Preventing IP overlapping