MyCloudSkill
← Cloud Essentials

CE · Lab 1 · About 20 minutes

Lab 1 - AWS Claude Agent Setup

Create your AWS account, turn on MFA and connect Claude in WSL so it can build in your own AWS project, safely tagged.

Overview

By the end of this lab, Claude in your WSL terminal can create and delete AWS resources in your own AWS project. It also tags every resource it creates with Course = MyCloudSkill. Setup takes about 20 minutes, and you never create access keys or IAM users.

This guide is for AWS's new sign-up experience. In it you sign in with your email or a Google, GitHub, Apple or Amazon login, there is no root user, and your resources live in a project with a spend limit.

What you need before you start

  • •Windows with WSL (Ubuntu) installed.
  • •Claude Code installed inside WSL. Typing claude --version should print a version number.
  • •An authenticator app on your phone, such as Google Authenticator, Microsoft Authenticator or Authy.
  • •An email address, or a Google, GitHub, Apple or Amazon account, that you haven't used for AWS before.

Step 1: Create your AWS account

  1. 1

    Go to aws.amazon.com and choose Create account.

  2. 2

    Sign up with your email, or with a Google, GitHub, Apple or Amazon login.

  3. 3

    Finish the sign-up screens. Most new accounts need no credit card and receive $100 in Free Tier credits.

  4. 4

    AWS creates your first project for you and opens AWS Settings at settings.aws.com.

Never click Activate advanced features. Activating advanced features can't be undone, it permanently removes your spend limit, and you take on all costs. You won't need it for this course. Don't upgrade to a paid plan either, unless your instructor asks you to.
If sign-up asks you to create a root user password or choose a Free plan or Paid plan, you are in AWS's classic sign-up instead. Stop and tell your instructor, who will send you the classic guide.

Step 2: Turn on MFA

In this experience your sign-in identity, an AWS Builder ID, owns your account. MFA goes on that identity, not on a root user.

  1. 1

    Open settings.aws.com.

  2. 2

    In the left menu, choose Manage security and sign-in. This opens your Builder ID profile.

  3. 3

    On the Security page, choose Register device, then Authenticator app.

  4. 4

    Choose Show QR code and scan it with your authenticator app.

  5. 5

    Type the 6-digit code the app shows and choose Assign MFA straight away. If you wait, the code can expire.

  6. 6

    Repeat with a second phone or a security key as a backup.

If you lose every MFA device, AWS can't recover your account. If you signed up with Google, GitHub, Apple or Amazon, also turn on two-step verification in that account, because it controls your sign-in.

Step 3: Note your project name and Region

The Claude setup in Step 4 asks for both, so write them down now.

  1. 1

    In settings.aws.com, select your project in the left menu.

  2. 2

    Note the project name.

  3. 3

    Open the Additional info tab and note the Region, for example us-east-1. AWS picks it from your contact details, and you can't change it.

You'll also choose a profile name for Claude to use. Everyone in the cohort uses mycloudskill, so the commands in this guide work as written.

Step 4: Connect Claude to your project

AWS gives you a prompt that sets everything up. It installs the AWS CLI, signs you in through your browser, and adds the AWS MCP server and AWS skills to Claude. No access keys are involved.

Copy the prompt from AWS

  1. 1

    In settings.aws.com, select your project.

  2. 2

    At the top right, choose Create and manage cloud infrastructure.

  3. 3

    Choose Use your AWS credentials with AI coding tools, then Copy agent prompt.

The copied prompt looks like this. Your Region may be different, so copy yours from AWS:

Example AWS agent prompt
Set up Agent Toolkit for AWS by following instructions:
https://raw.githubusercontent.com/aws/agent-toolkit-for-aws/refs/heads/main/setup-instructions/setup.md

Your AWS Region is: us-east-2
AWS experience: The new AWS experience

Paste the whole prompt into Claude, including the link and both lines below it.

Run it in Claude

  1. 1

    Open your WSL terminal and make a folder for your labs:

    Terminal
    mkdir -p ~/mycloudskill && cd ~/mycloudskill
    claude
  2. 2

    Paste the AWS prompt into Claude and press Enter.

  3. 3

    Answer Claude's questions. The prompt already includes your Region and experience, so Claude usually asks only for the profile name and help level:

Claude asksYour answer
Profile namemycloudskill
Signed up with a social login and created a project?Yes (already in the prompt)
RegionAlready in the prompt. If asked, your Step 3 Region
Help level for the AWS rulesMedium
  1. 1

    When Claude runs aws login, a browser opens. Sign in and choose your project name.

  2. 2

    Approve each command Claude asks to run. When it finishes, exit Claude with /exit.

If the browser doesn't open from WSL, run the login yourself with the remote option below. Open the URL it prints in your Windows browser, sign in, then paste the code back into the terminal.
Terminal
aws login --remote --profile mycloudskill

Check it works

Terminal
aws sts get-caller-identity --profile mycloudskill

The output should show an Account number and an Arn. If you get an error, re-run aws login --profile mycloudskill.

Step 5: Add the global MyCloudSkill rules

The AWS setup wrote its own rules into ~/mycloudskill/CLAUDE.md. The course rules go in ~/.claude/CLAUDE.md, which Claude reads at the start of every session in every folder. Claude follows both files.

1. Make mycloudskill Claude's default profile

Terminal
mkdir -p ~/.claude
cat > ~/.claude/settings.json << 'EOF'
{
  "env": {
    "AWS_PROFILE": "mycloudskill"
  }
}
EOF
echo 'export AWS_PROFILE=mycloudskill' >> ~/.bashrc && source ~/.bashrc
If you already have a ~/.claude/settings.json, don't overwrite it. Open it with nano and add only the env block.

2. Create the global rules file

Copy this whole block into your WSL terminal and press Enter.

Terminal
cat > ~/.claude/CLAUDE.md << 'EOF'
# MyCloudSkill AWS rules (apply to every task)

## Tagging (mandatory)
- Every AWS resource you create MUST have the tag Course=MyCloudSkill,
  applied at creation time.
- If I mention a lesson number, also add the tag Lesson=<number>.
- AWS CLI: use the create command's own tag option (--tags,
  --tag-specifications or --tagging).
- If a resource cannot be tagged at creation, tag it right after with the
  service's tag command or `aws resourcegroupstaggingapi tag-resources`.
- CloudFormation / SAM: deploy with --tags Course=MyCloudSkill.
- CDK: add Tags.of(app).add('Course', 'MyCloudSkill') in the app entry file.
- Terraform: set default_tags { tags = { Course = "MyCloudSkill" } } in the
  aws provider block.
- Never leave a resource untagged. If you cannot tag something, stop and
  tell me.

## Account and access
- Always use AWS profile mycloudskill and the Region saved in that profile.
- If credentials have expired, tell me to run:
  aws login --profile mycloudskill
- Never create IAM users, access keys or long-lived credentials.
- Never activate advanced features, upgrade the account plan or change
  spend limits.

## Cost safety
- Prefer Free Tier eligible services and the smallest sizes (for example
  t3.micro).
- Before creating anything billed per hour (NAT gateway, RDS, load balancer,
  EKS, OpenSearch), tell me the expected cost and ask first.

## After creating resources
- Give me a short table: resource type, name or ID, Region, tags.

## Cleanup
- Only delete resources tagged Course=MyCloudSkill. Never touch untagged
  resources.
- Before deleting, list exactly what will be deleted and wait for my
  confirmation.
- After cleanup, run
  `aws resourcegroupstaggingapi get-resources --tag-filters Key=Course,Values=MyCloudSkill`
  and confirm nothing is left. Deleted resources can show up there for a
  short while.
EOF

3. Confirm Claude loaded the rules

Start claude again and ask: What tag must every AWS resource you create have, and which AWS profile do you use? It should answer Course=MyCloudSkill and mycloudskill.

Step 6: Start of every lab session

Your sign-in lasts 12 hours, so sign in again at the start of each session:

Terminal
cd ~/mycloudskill
aws login --profile mycloudskill
aws sts get-caller-identity
claude

You can renew without a full browser sign-in for up to 90 days. After that, aws login asks you to approve access in the browser again.

End every lab by asking Claude: Delete all resources tagged Course=MyCloudSkill from today's lesson and confirm nothing is left.

Setup checklist and course rules

Tick these off before your first lab:

Rules for the whole course

  • •Never click Activate advanced features. It can't be undone and it removes your spend limit.
  • •Never create IAM users or access keys. aws login is all you need.
  • •End every lab by asking Claude to delete that lesson's resources.
  • •Check your remaining credits in AWS Settings once a week.
  • •If Claude says your credentials expired, run aws login --profile mycloudskill.

Sources

  • •Compare sign-up options: docs.aws.amazon.com/accounts/latest/reference/sign-up-for-aws.html
  • •Register MFA devices in AWS Settings: docs.aws.amazon.com/accounts/latest/reference/register-mfa-devices.html
  • •Connect an AI coding tool: docs.aws.amazon.com/accounts/latest/reference/connect-ai-coding-tool.html
  • •Agent Toolkit setup: github.com/aws/agent-toolkit-for-aws (setup-instructions/setup.md)
  • •AWS CLI login: docs.aws.amazon.com/cli/latest/userguide/cli-configure-sign-in.html
  • •Activate advanced features: docs.aws.amazon.com/accounts/latest/reference/activate-advanced-features.html