If you’re using the CLI with MFA, you have to set the session token in addition to setting the access and secret keys. Please refer to this article:
https://aws.amazon.com/premiumsupport/knowledge-center/authenticate-mfa-cli/
Related Contents:
- Quick way to get AWS Account number from the AWS CLI tools?
- AWS create role – Has prohibited field
- Downloading an entire S3 bucket?
- AccessDenied for ListObjects for S3 bucket when permissions are s3:*
- How can I use wildcards to `cp` a group of files with the AWS CLI
- How to use multiple AWS accounts from the command line?
- How to change User Status FORCE_CHANGE_PASSWORD?
- AWS ECS Error when running task: No Container Instances were found in your cluster
- AWS Lambda:The provided execution role does not have permissions to call DescribeNetworkInterfaces on EC2
- Error “You must specify a region” when running any aws CLI command
- Difference between AWS Elastic Container Service’s (ECS) ExecutionRole and TaskRole
- Terraform: correct way to attach AWS managed policies to a role?
- AWS CLI S3 A client error (403) occurred when calling the HeadObject operation: Forbidden
- How do I delete a versioned bucket in AWS S3 using the CLI?
- How long should I wait after applying an AWS IAM policy before it is valid?
- Proper access policy for Amazon Elastic Search Cluster
- Unable to select Custom SSL Certificate (stored in AWS IAM)
- How list Amazon S3 bucket contents by modified date?
- How do you comment out lines in AWS CLI config and credentials files?
- Can you require MFA for AWS IAM accounts?
- Is it possible to restrict AWS users/accounts to a specific region?
- How to “switch role” in aws-cli?
- Deleting S3 files with a given prefix only
- Get ARN of S3 Bucket with aws cli
- AWS CloudFormation Stack update error: Requires capabilities : [CAPABILITY_IAM]
- `Authorization Token has expired` issue AWS-CLI on MacOS Sierra
- AWS sts assume role in one command
- aws lambda function getting access denied when getObject from s3
- What is exactly “Assume” a role in AWS?
- Difference between IAM role and IAM user in AWS
- how to return items in a dynamodb on aws-cli
- How do I set the name of the default profile in AWS CLI?
- awscli version 2 on alpine linux
- Signature expired: is now earlier than error : InvalidSignatureException
- How to attach multiple IAM policies to IAM roles using Terraform?
- How can I allow a Group to assume a Role?
- How to delete multiple files in S3 bucket with AWS CLI
- Call aws-cli from AWS Lambda
- AWS CLI S3: copying file locally using the terminal : fatal error: An error occurred (404) when calling the HeadObject operation
- AWS lambda invoke not calling another lambda function – Node.js
- Copy multiple files from s3 bucket
- Terraform: Error creating IAM Role. MalformedPolicyDocument: Has prohibited field Resource
- Export a DynamoDB table as CSV through AWS CLI (without using pipeline)
- Is there a way to export an AWS CLI Profile to Environment Variables?
- AWS IAM: Unable to create additional Access Key
- In AWS IAM, What is the Purpose/Use of the “Path” Variable?
- A client error (400) occurred when calling the HeadObject operation: Bad Request Completed 1 part(s) with … file(s) remaining
- Is there any way to get s3 uri from aws web console?
- How to cp file only if it does not exist, throw error otherwise?
- Find role being used on server from AWS CLI