1 Answer
- Newest
- Most votes
- Most comments
0
There are two ways I can think of,
1- something like:
import boto3
s3_client = boto3.client('s3')
response = s3_client.get_object(Bucket='testbucket',Key='testfile')
print(response.get('ServerSideEncryption'))
Not sure why your s3api CLI didn't work, but this above sample snippet works even for a readonly user.
2- Enable and use S3 Inventory, where you get frequent reports of all the objects in a bucket and in that report you can check the Encryption status for each of the objects.
I recommend using inventory specially if this task, checking the encryption of objects, is a frequent task. You can provide access only to the inventory reports to a user for that purpose.
Relevant content
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago