InvalidClientTokenId when provisioning the cold start baseline #93
-
|
Getting started deploying our reference architecture today - Whilst running This deploys the S3 bucket and Dynamo tables for the Terraform state perfectly fine, but I don't seem to be able to deploy │ Error: creating IAM Role (xxx-core-gbl-root-tfstate): operation error IAM: CreateRole, https response error StatusCode: 403, RequestID: xxxx, api error InvalidClientTokenId: The security token included in the request is invalid
√ . [xxx-identity] (HOST) infrastructure ⨠ aws sts get-caller-identity
{
"UserId": "xxxxxxx",
"Account": "xxxxxxx",
"Arn": "arn:aws:iam::xxxxxxx:user/SuperAdmin"
}Do you have any insights in what the possible cause for this can be? I've already checked MFA on both the root and SuperAdmin user as I believe that's a requirement to create IAM roles via the CLI. Do you have any insights in what can cause this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The
Terraform should be using your local role when bootstrapping the backend. In your stack configuration (
Sometimes a previous run generates backend configuration files that interfere with the cold start process.
Run the first apply directly (replace atmos terraform apply tfstate-backend -var=access_roles_enabled=false --stack core-use1-root --auto-generate-backend-file=falseIf that succeeds, complete the S3 migration: atmos terraform apply tfstate-backend -var=access_roles_enabled=false --stack core-use1-root --init-run-reconfigure=false |
Beta Was this translation helpful? Give feedback.
The
InvalidClientTokenIderror usually means Terraform is attempting to use credentials that AWS does not recognize, even though your CLI session withaws sts get-caller-identitylooks correct. Please walk through some checks to make sure everything is set up properly.SuperAdminis configured correctlySuperAdminto ensure you’re prompted for MFA.SuperAdminlocallyaws sts get-caller-identity.SuperAdminidentity, as you’ve shown.tfstat…