Update IAM Role

Update IAM Role

  1. Configure the environment
export ACCOUNT_ID=xxx
export AWS_REGION=xxx

Create Workspace

  1. Check the AWS_REGION
test -n "$AWS_REGION" && echo AWS_REGION is "$AWS_REGION" || echo AWS_REGION is not set

Create Workspace

  1. Save to bash_profile
echo "export ACCOUNT_ID=${ACCOUNT_ID}" | tee -a ~/.bash_profile
echo "export AWS_REGION=${AWS_REGION}" | tee -a ~/.bash_profile
aws configure set default.region ${AWS_REGION}
aws configure get default.region

Create Workspace

  1. Verify IAM Role
aws sts get-caller-identity --query Arn | grep eks-blueprints-cdk-workshop-admin -q && echo "IAM role valid" || echo "IAM role NOT valid"

Create Workspace

If the result is “IAM role NOT valid,” please review the previous steps to ensure that the IAM role you created and assigned to the Cloud9 Workspace is correct.