AWS Agents For Devsecops
AWS Core
Core Skills · AWS…
Migration And Modernization Skills
Networking And Content Delivery Skills
Security And Identity Skills
System Table Skills
Web And Mobile Development
118 chapters · 643 min
Core Skills
Chapter 44 of 118
Gets AWS credentials for CLI/SDK access via aws login.
4 minutes · 795 words · 17 sections
Help developers get AWS credentials for local development using aws login. This provides short-term, auto-rotating credentials that refresh every 15 minutes and remain valid for up to 12 hours.
Important:
aws login and aws --version in the user’s local shell — NOT via MCP/API tools.aws login. Do not tell the user to run the command themselves — ask if YOU should run it (e.g., “Ready for me to run aws login?” or “Shall I proceed with aws login?”). Wait for their response before proceeding.The aws login command requires AWS CLI version 2.32.0 or later.
Check the installed version:
aws --versionIf the CLI is not installed or is below 2.32.0, inform the user and ask if they’d like to install/update (link them to the AWS CLI installation guide (opens in a new tab)), or if they’d prefer to continue without this skill’s guidance. If they choose to continue without upgrading, respond to their original request as you normally would without this skill.
In your first response, always tell the user that aws login is the fix — explain that it provides short-term, auto-rotating credentials and that it requires AWS CLI 2.32.0 or later. Do not stop at “let me check your CLI version” — name the remediation up front so the user knows where this is going, then describe the precondition checks you’ll run before invoking it.
Run these via the local shell to inform your plan. Report what you find, but do not gate the recommendation on user-supplied output:
aws --version — confirm the CLI is 2.32.0 or later. If not installed or too old, point the user to the AWS CLI installation guide (opens in a new tab) and stop.aws sts get-caller-identity — check current credentials.
aws login --profile <name> so the existing default isn’t overwritten.aws login on the default profile.aws configure list — if access_key starts with AKIA, explain that long-term access keys are less secure (never expire, persist on disk as secrets, grant indefinite access if leaked) and that aws login provides short-term credentials that auto-rotate every 15 minutes, expire automatically, and require no manual rotation.Once preconditions are clear, ask the user for confirmation specifically for the aws login invocation — and only there. Do not tell the user to run the command themselves; ask if you should run it (e.g., “Ready for me to run aws login?” or “Shall I proceed with aws login --profile staging?”). Wait for their response, then run aws login (or aws login --profile <name>).
After aws login completes, run aws sts get-caller-identity (with --profile if used) to confirm success. If a named profile was used, remind the user to pass --profile or set AWS_PROFILE.
The CLI is not installed or below 2.32.0. Direct the user to install or update: AWS CLI installation guide (opens in a new tab).
Suggest aws login --remote which provides a URL and code for cross-device authentication (e.g., when using a remote server without a browser).
The IAM identity needs the SignInLocalDevelopmentAccess managed policy attached (to the user, role, or group). Root users do not need it. Tell the user to ask their administrator to add it, or attach it themselves if they have IAM permissions.
aws login is not available in AWS GovCloud (US) or AWS China regions. Do not mention this exception proactively — only relevant if the user explicitly states they are in one of these partitions.
aws sso login WorkflowsIf the user mentions aws sso login or has an existing SSO configuration, do NOT redirect them to aws login. These are different commands for different situations:
aws sso login is for users whose organization has configured AWS IAM Identity Center (SSO). They have profiles in ~/.aws/config pointing at an SSO start URL. Respect their established workflow.aws sso login is failing, help troubleshoot within their context: expired SSO session, revoked authorization, cached token issues (~/.aws/sso/cache/), or Identity Center configuration changes.aws configureDo NOT mention aws configure in your initial response or include it as a table row alongside aws login. Only offer it as an alternative if:
aws login or asks for alternativesaws login is unavailable)When offering it, explain that long-term access keys are less secure: they persist on disk as plaintext, never expire automatically, and grant indefinite access if leaked.
aws loginaws login works with root users, IAM users and federation with IAMInstall this repository
npx skills add aws/agent-toolkit-for-aws/plugin marketplace add aws/agent-toolkit-for-awsSkills install per repository, not per chapter — the CLI has no documented per-skill form, so we do not print one.
Gets AWS credentials for CLI/SDK access via `aws login`. Activates when a developer needs to authenticate to AWS for local development, when an AWS operation fails due to missing or expired credentials, or when someone asks about setting up AWS access. Triggers: "set up AWS", "configure AWS", "aws login", "get credentials", "authenticate", "session expired", "token expired", "no credentials", "AccessDeniedException" with no configured credentials.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
skills/core-skills/signing-in-to-aws/SKILL.mdmain, last pushed 10 August 2026.SKILL.md, not by matching a directory convention. 16 distinct layouts observed: plugins/aws-agents-for-devsecops/skills/*/SKILL.md, plugins/aws-agents/skills/*/SKILL.md, plugins/aws-core/skills/*/SKILL.md, skills/core-skills/*/SKILL.md, skills/specialized-skills/analytics-skills/*/SKILL.md, skills/specialized-skills/database-skills/*/SKILL.md, skills/specialized-skills/ec2-skills/*/SKILL.md, skills/specialized-skills/migration-and-modernization-skills/*/SKILL.md, skills/specialized-skills/networking-and-content-delivery-skills/*/SKILL.md, skills/specialized-skills/operations-skills/*/SKILL.md, skills/specialized-skills/resilience-skills/*/SKILL.md, skills/specialized-skills/security-and-identity-skills/*/SKILL.md, skills/specialized-skills/serverless-skills/*/SKILL.md, skills/specialized-skills/storage-skills/*/SKILL.md, .skills/specialized-skills/system-table-skills/*/SKILL.mdskills/specialized-skills/web-and-mobile-development/*/SKILL.mdh1 and no skipped levels:.claude-plugin/marketplace.json by Amazon Web Services, declaring 4 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./aws/agent-toolkit-for-aws.md, and each chapter at its own .md URL.