$ docker run --rm -ti -v ~/.aws:/root/.aws amazon/aws-cli configure
AWS Access Key ID [None]: A*************J
AWS Secret Access Key [None]: T******************b
Default region name [None]: ap-south-1
Default output format [None]: json
$ docker run --rm -ti -v ~/.aws:/root/.aws amazon/aws-cli iam get-user
{
"User": {
"Path": "/",
"UserName": "full-access-user-jai",
"UserId": "A*************J",
"Arn": "arn:aws:iam::07********8:user/full-access-user-jai",
"CreateDate": "2020-07-26T20:18:29+00:00"
}
}
$ docker run --rm -ti -v ~/.aws:/root/.aws amazon/aws-cli s3 ls