Use when using the AWS CLI against a corporate AWS account after SAML/OIDC federation (e.g. saml2aws, aws sso login), when STS fails with invalid XML or empty responses, when selecting profiles or regions for Terraform or CI/CD stacks, or when validating RDS engine versions with describe-orderable-db-instance-options in the target account and region.
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Use the correct AWS account, named profile, and region when the organization authenticates through IdP federation (SAML via tools like saml2aws, or IAM Identity Center / aws sso login). Avoid misleading CLI errors (invalid XML, empty body, wrong account) and align local commands with infrastructure-as-code (Terraform, Pulumi, Spacelift, etc.).
saml2aws, aws sso login, or similar corporate flows before running aws.aws sts get-caller-identity fails with Unable to parse response / invalid XML / b''.This skill is vendor-neutral; follow your organization’s SSO and least-privilege runbooks in addition to these notes.
saml2aws, aws sso, etc.)--profile <name>.aws sts get-caller-identity --profile <profile-from-login-output>aws without --profile uses default or AWS_PROFILE. Stale or empty default often produces confusing errors—not a clear “access denied”.export AWS_PROFILE=..., ensure environment variables do not override the profile chain:
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKENb'')Typical causes (check in order):
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN set in the shell — unset them when using a profile.aws binaries — which -a aws may list more than one install. If behavior is odd, call the intended binary explicitly (example on Apple Silicon Homebrew):
/opt/homebrew/bin/aws sts get-caller-identity --profile <profile>HTTPS_PROXY, HTTP_PROXY, AWS_ENDPOINT_URL, AWS_USE_FIPS_ENDPOINT, AWS_CA_BUNDLE if responses look non-AWS.suspended aws ... means SIGTSTP, not an AWS API error. Run jobs, fg, or kill %<n> and retry.To see what the shell resolves:
type aws
which -a awsPrefer command aws or the full path to bypass wrappers while debugging.
var.region_primary in Terraform) must match --region on CLI calls for regional services (RDS, EC2, many others).db.serverless) in the target account and region:
aws rds describe-orderable-db-instance-options \
--profile <profile> \
--engine aurora-mysql \
--db-instance-class db.serverless \
--region <stack-primary-region> \
--query 'OrderableDBInstanceOptions[].EngineVersion' \
--output text | tr '\t' '\n' | sort -uengine_version string from documentation or another region is valid where you deploy—query orderable options in the target region when creation fails with Cannot find version ….saml2awsIf your IdP exposes several roles and you need a fixed one for scripts (example pattern only—substitute your org’s ARNs and aliases):
SAML2AWS_ROLE='arn:aws:iam::<account-id>:role/<role-name>' \
saml2aws login -a <idp-account-alias> --force --skip-promptsaski/arnesto
752f690
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.