Test and Share Encrypted Data on S3

Test and Share Encrypted Data on S3

  1. Access AWS Management Console

    • Find S3
    • Select S3

demo

  1. In the S3 interface

    • Select Buckets
    • Select General purpose buckets
    • Select kms-key-s3-<account-id>-<region>-an

demo

  1. In the kms-key-s3-<account-id>-<region>-an section

    • Select the awsfcaj.jpg data
    • Press Open

demo

  1. 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.

demo

  1. 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.

  1. Return to the kms-key-s3-<account-id>-<region>-an interface

    • Select the awsfcaj.jpg data
    • Select Actions
    • Select Make public using ACL

demo

  1. In the Make public section

    • Press Make public

demo

  1. Success notification

demo

  1. Return to the kms-key-s3-<account-id>-<region>-an section

    • Select awsfcaj.jpg
    • Press Copy URL

demo

  1. 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.

demo

  1. 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

demo

  1. 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.

demo

  1. While still in User-S3, go back to the kms-key-s3-<account-id>-<region>-an section

    • Select awsfcaj.jpg
    • Copy URL

demo

  1. 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.

demo

This section creates a URL to share the data with everyone.

  1. Go back to your original User

    • Access S3
    • Select qrcode_facebook-awsfcaj.png
    • Select Actions

demo

Select Share with a presigned URL

  1. 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

demo

  1. Success notification, then press Copy presigned URL

demo

  1. 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.

demo

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

demo