Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS, Credential must have exactly 5 slash-delimited elements,

During executing eb init on Ubuntu 16.04 I faced an error Credential must have exactly 5 slash-delimited elements, e.g. keyid/date/region/service/term,.

I understand that my keyid has slashes but they must be there, key was provided by AWS and it is generated. I have no idea how to skip this validation. As I know on MAC this problem is not present.

How can I deal with this error? thanks

like image 722
a.kozubenko Avatar asked Jun 15 '18 09:06

a.kozubenko


3 Answers

An AWS Access Key ID does not have any slashes. It is comprised of uppercase ASCII letters only, and begins with AKIA... or ASIA....

One possible explanation is that you have transposed your access key ID with the accompanying secret access key, which does often have slashes.

Access keys consist of an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY).

https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys

If you have indeed transposed these values in your configuration, you should deactivate these credentials and create new ones before proceeding, because you may have inadvertently exposed your secret key.

like image 70
Michael - sqlbot Avatar answered Oct 08 '22 06:10

Michael - sqlbot


In my case, I was using access_key as secret_key and secrect_key as access_key.

So better to double-check the secret.

Also access key should not contain any special character. Plus one easy to identify the access key is to looking into prefix of the key.

The access key begins with the prefix ASIA, otherwise it beings with AKIA. All random looking ID’s on AWS have their own 4 letter prefixes that identify what they are.

aws_security_credential_formats

like image 25
Adiii Avatar answered Oct 08 '22 06:10

Adiii


i have environmental variables for access id and secret key, i had them interchanged, that was the issue, once i set those correctly it works

like image 3
Akhil Avatar answered Oct 08 '22 06:10

Akhil