I try to use aws cli with docker images.
the command line like :
slu@machine:/c/work/dfsi$ export AWS_PROFILE=role-development
slu@machine:/c/work/dfsi$ aws ecr get-login
An error occurred
(AccessDeniedException) when calling the GetAuthorizationToken operation: User: arn:aws:iam::XXXXXXXXXXXX:user/slu is not authorized to perform: ecr:GetAuthorizationToken on resource: *
but I can do:
aws ecr get-login --profile=role-development
What I want to do isn't obviously write --profile
and try to do it with hidden --profile variable
?
How to do that?