I am using an existing python 2.7 script that imports boto
. I got the error Requests specifying Server Side Encryption with AWS KMS managed keys require AWS Signature Version 4
so I am currently trying to add this using Using boto for AWS S3 Buckets for Signature V4 as a resource.
Some answers there advised adding this code:
if not boto.config.get('s3', 'use-sigv4'):
boto.config.add_section('s3')
boto.config.set('s3', 'use-sigv4', 'True')
From reading the linked docs, it seems I should add this to the config.py from botocore. I did this, but I still get the error.There's also this snippet in the docs: Specify the following in the boto default config file:
[s3] use-sigv4 = True
I'm not clear on where to add this.
Or, it seems I could set s3 to use sigv4 by default in the cli by using:
aws configure set default.s3.signature_version s3v4
I don't have the Amazon CLI installed and am not familiar with it, so I'm wondering if there's another way I can set it to be the default version.