When I pull a clean Alphine Linux Docker image, install aws-cli
on it and try to authenticate myself with aws ecr get-authorization-token --region eu-central-1
I keep getting the following error:
An error occurred (UnrecognizedClientException) when calling the GetAuthorizationToken operation: The security token included in the request is invalid.
I've already checked the timezone which seem to be okay, and the command works properly on my local machine.
These are the commands I run to set up aws-cli
:
apk add --update python python-dev py-pip
pip install awscli --upgrade
export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX
export AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Is there something obvious I'm missing?
export AWS_SESSION_TOKEN=XXXXX
. How are you getting the access and secret keys? – LanternAWS_SESSION_TOKEN
necessary? I thought this was only necessary if you don't use the permanent keys which I use. Also, it's not mentioned in the documentation: docs.aws.amazon.com/rekognition/latest/dg/setup-awscli.html. – Farrar