jd2050
jd2050

Reputation: 302

I'm not able to create bucket in Amazon S3 using AWS CLI

This is content of my "config" file:

[default]

region = us-west-1

output = json

[profile reader]

region = region=us-west-1

output = json

[profile writer]

region = region=us-west-1

output = json

This is content of my "credentials" file

[default]

aws_access_key_id = .....................J6O

aws_secret_access_key = .................PNM/a


[reader]

aws_access_key_id = .....................PPF

aws_secret_access_key = .................iPQ46


[writer]
aws_access_key_id = .....................J6O

aws_secret_access_key = .................PNM/a

This is command I use in AWS CLI:

C:\Users\Evgeni\.aws>aws s3 mb s3://rofl.easy-breezy.kek --profile=writer

When I try to run it, I have this error:

Invalid endpoint: https://s3.region=us-west-1.amazonaws.com

But if I run it with specified --region parameter - it works fine:

C:\Users\Evgeni\.aws>aws s3 mb s3://yewfy.topkek.azaza44666 --profile=writer --region=us-west-1

make_bucket: yewfy.topkek.azaza44666

What am I doing wrong?

Upvotes: 0

Views: 561

Answers (2)

Javier Ramirez
Javier Ramirez

Reputation: 3988

your config file says

region = region=us-west-1

in two places. remove the extra region= from those lines

Upvotes: 4

Istvan
Istvan

Reputation: 8552

You have typo in the config:

region = region=us-west-1

Upvotes: 4

Related Questions