Môi trường CloudShell tự động sử dụng quyền IAM của bạn, nên bạn không cần thiết lập Role như với máy chủ EC2.
sudo yum -y install jq gettext bash-completion

pip install cfn-lint

cfn-lint --version

export ACCOUNT_ID=$(aws sts get-caller-identity --output text --query Account)
export AWS_REGION=$AWS_REGION
export AZS=($(aws ec2 describe-availability-zones --query 'AvailabilityZones[].ZoneName' --output text --region $AWS_REGION))

echo "export ACCOUNT_ID=${ACCOUNT_ID}" | tee -a ~/.bash_profile
echo "export AWS_REGION=${AWS_REGION}" | tee -a ~/.bash_profile
echo "export AZS=(${AZS[@]})" | tee -a ~/.bash_profile
aws configure set default.region ${AWS_REGION}

cdk --version

aws sts get-caller-identity
