내용으로 건너뛰기

The security token included in the request is invalid

0

The latest AWS credentials (key + secret) are used, but I keep getting this error for Direct Connect:

com.amazonaws.services.directconnect.model.AmazonDirectConnectException: The security token included in the request is invalid. (Service: AmazonDirectConnect; Status Code: 400; Error Code: UnrecognizedClientException; Request ID: <ID>)

질문됨 일 년 전416회 조회

1개 답변
0

Hi,

One possibility could be that your AWS Account has not opted into the AWS Region that you are making a request to.

  1. Is it an OptIn Region? https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html#regions-opt-in-status
  2. Have you opted into that Region?
  3. You can confirm or set the Region by explicitly specifying the Region using --region <insert_region_code e.g. us-east-1> in your request.

Another possibility could be you are using temporary session credentials which have three pieces to it - the key, the secret and a token - and you have not set all three pieces in your AWS credentials. Since you have mentioned (key + secret) - please confirm if there's a third token part to the credentials your are using.

You can confirm if the credentials are valid in general by running the commands below

  • // verify creds against regular default region
aws sts --region us-east-1 get-caller-identity
  • // verify creds against your specific region of interest
aws sts --region <insert_specific_region_code> get-caller-identity

Thanks.

AWS
전문가

답변함 일 년 전

전문가

검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠