Wonko the Sane
Wonko the Sane

Reputation: 832

How to access s3 bucket with key and secret?

I have been given some credentials to access a S3 bucket. I have what looks like a username, password, key and secret.

I've logged into my S3 account but where do I plug in the details?

Upvotes: 2

Views: 14851

Answers (1)

KayD
KayD

Reputation: 826

You can use them as

AWS Web Console: username and password

AWSCLI: key and secret (for programmatic access)

Once you will setup/configure your key/secret then you can access it from awscli, boto3 or any SDK of your choice. For example,

aws s3 ls s3://mybucket
aws s3 ls
aws s3api list-objects --bucket text-content --query 'Contents[].{Key: Key, Size: Size}'
aws s3api list-buckets --query "Buckets[].Name"

For complete set of commands of aws-cli you can follow:

  1. s3api
  2. Leveraging the s3 and s3api Commands
  3. aws s3

Upvotes: 2

Related Questions