
Let's have Claude Code build an AWS learning environment for us!
This page has been translated by machine translation. View original
This article is part of クラスメソッド × AI駆動開発 Advent Calendar 2025 - Adventar, Day 15.
Hello! I'm Koty-Mousa (Kotaro Yasaka)!
Today, I'd like to share how I use Claude Code to build AWS learning environments in my daily work.
I first started using AWS when I joined my company, Annotation Inc., about a year and a half ago.
Since then, I've been conducting many tests by operating the management console.
However, testing and learning about unfamiliar services and features often takes time.
While my previous testing mainly involved manual operations in the management console, I decided to try using Claude Code to improve my learning process!
AWS CLI with Claude Code
Claude Code is a CUI-based interactive development tool for Claude.
It runs in terminals on your PC, such as PowerShell or zsh.
Claude Code can read files stored in a specified folder and edit or create code and text.
Particularly useful for building AWS environments is Claude Code's ability to directly execute commands in the terminal.
This allows us to have Claude Code execute AWS commands (AWS CLI) in the terminal.
Unlike typical web-based generative AI, it can directly operate your PC, making AWS testing more efficient and easier.
Setup
To use Claude Code for AWS CLI operations, you need to set up both Claude Code and AWS CLI.
Here are the blogs that I actually used for the setup process:
Claude Code
I set it up by following this article as well.
Following the "Claude Code Installation" and "Initial Setup" sections in the above blog will get you mostly ready.
AWS CLI
You can install AWS CLI by following the procedures on the AWS site and our company blog above.
Currently, I'm using aws-vault for enhanced security.
You can install aws-vault by following the steps in "Procedure 6: AWS Vault Installation (Secure Management of AWS Credentials)" in the above article.
CLAUDE.md
CLAUDE.md serves as the basic instruction for Claude Code operation.
In my case, I mainly include the following information:
- How to access IAM users via AWS CLI (aws-vault)
- Look up AMI IDs each time when launching EC2
- When VPC selection is necessary, confirm with the user which VPC to use
- Use unified prefixes for resource names
- Set minimum permissions for security groups and IAM (principle of least privilege)
- Check your IP at
https://checkip.amazonaws.com/ - Be thorough when confirming deletions
These are based on issues I've encountered during actual use.
For example, EC2 AMI IDs differ by region.
Due to insufficient instructions, I often tried to launch in the Tokyo region using Northern Virginia region AMI IDs.
Therefore, I now have it check AMI IDs each time.
Design Documents
Sometimes I prepare system design documents in Markdown format in advance and have Claude Code read them.
Especially when building systems that integrate multiple AWS services like VPC, EC2, and RDS, providing design documents helps Claude Code understand the overall picture.
Additional Notes
Claude Code asks for confirmation each time it executes a command.
While it's possible to disable this and skip confirmations, I haven't done so.
Although this setting could speed up development, I use Claude Code primarily for learning, so I find it important to understand what operations are being performed.
It's very educational.
Also, after once completely wiping my PC data and getting into trouble, I'm particularly careful with deletion commands.
I also implement controls for this in CLAUDE.md.
For these reasons, I confirm each operation one by one.
Let's Try It!
Now, let's actually try it as a test run!
Since this is the first time, we'll start with something simple: launching an EC2 instance!
As an aside, I remember desperately compiling this article about a year ago.
Since today's task is simple, I won't prepare a procedure document.
I'll instruct Claude Code as follows:
Please launch an EC2 instance
Use the Tokyo region
Use the latest Amazon Linux 2023
Use t3.medium
Create a new VPC, etc.
Allow SSH connections from this PC's IP address
When executing command operations, it displays what will be executed each time.
If there are no issues, select Yes.

After confirming each operation, I successfully launched an EC2 instance!
I've confirmed that AWS CLI operations can be performed properly from Claude Code!
While this task is very simple and could be done directly via CLI,
it's a very useful tool for more complex testing scenarios!
In future posts on this blog, I'll share more about testing with Claude Code!
That's all from Koty-Mousa (Kotaro Yasaka)!
Thumbnail illustration generated by Gemini, based on original work by Koty-Mousa.
Character(s) by Koty-Mousa.
About Annotation Inc.
Annotation Inc. is a specialized operations company within the Classmethod Group. Our specialized support, operations, development maintenance, IT department, and back-office teams leverage the latest IT technology, high technical capabilities, and accumulated know-how to solve customer challenges. We are recruiting members for various positions. If you're interested in our culture, systems, and work style that together realize "Operational Excellence" and "Working and living authentically," please visit the Annotation Inc. Recruitment Site.

