With boto
I could connect to public S3 buckets without credentials by passing the anon=
keyword argument.
s3 = boto.connect_s3(anon=True)
Is this possible with boto3
?
To summarize, resources are higher-level abstractions of AWS services compared to clients. Resources are the recommended pattern to use boto3 as you don't have to worry about a lot of the underlying details when interacting with AWS services. As a result, code written with Resources tends to be simpler.
Configuring credentials There are two types of configuration data in Boto3: credentials and non-credentials. Credentials include items such as aws_access_key_id , aws_secret_access_key , and aws_session_token .
Yes. Your credentials are used to sign all the requests you send out, so what you have to do is configure the client to not perform the signing step at all. You can do that as follows:
import boto3 from botocore import UNSIGNED from botocore.client import Config s3 = boto3.client('s3', config=Config(signature_version=UNSIGNED)) # Use the client
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With