Test and Share Encrypted Data on S3
Test and Share Encrypted Data on S3
-
Access AWS Management Console

-
In the S3 interface
- Select Buckets
- Select General purpose buckets
- Select
kms-key-s3-<account-id>-<region>-an

-
In the kms-key-s3-<account-id>-<region>-an section
- Select the awsfcaj.jpg data
- Press Open

- As you can see, after pressing Open, the data will be opened. Because I created access permissions for the owner account, it can access the data.

- Next, we Make public to allow everyone to try accessing the data on S3
This step is only for demonstration. A public ACL or copied object URL is not enough for SSE-KMS objects; the request still needs the correct signature and KMS permissions.
-
Return to the kms-key-s3-<account-id>-<region>-an interface
- Select the awsfcaj.jpg data
- Select Actions
- Select Make public using ACL

-
In the Make public section

- Success notification

-
Return to the kms-key-s3-<account-id>-<region>-an section
- Select awsfcaj.jpg
- Press Copy URL

- After pasting the URL into a new tab, you will not be able to open the data because AWS requests for server-side encryption with AWS KMS managed keys require AWS Signature Version 4.

-
Next, go back to the incognito tab and sign in with the user information created in section 2.2 Create Group and User
- Then access S3
- Select Buckets
- Select General purpose buckets
- Select
kms-key-s3-<account-id>-<region>-an
- Select awsfcaj.jpg
- Select Open

- In User-S3, you will receive an access denied message. This user can reach the S3 object, but S3 cannot decrypt the SSE-KMS object because User-S3 does not have the required AWS KMS permission, such as kms:Decrypt.

-
While still in User-S3, go back to the kms-key-s3-<account-id>-<region>-an section
- Select awsfcaj.jpg
- Copy URL

- After pasting the URL into a new tab, you will not be able to open the data because AWS requests for server-side encryption with AWS KMS managed keys require AWS Signature Version 4.

This section creates a URL to share the data with everyone.
-
Go back to your original User
- Access S3
- Select qrcode_facebook-awsfcaj.png
- Select Actions

Select Share with a presigned URL
-
Next step
- In Time interval until the presigned URL expires, select Minutes
- In Number of minutes, select 2 (I set it to 2 minutes here for demo purposes)
- Press Create presigned URL

- Success notification, then press Copy presigned URL

- Anyone who has this URL can open and view the data within 2 minutes. The presigned URL works because it was generated by the authorized original user.

- After 2 minutes, an Access Denied notification will appear and access will expire
