Skip to content

How to use Cloud Architect in Claude Code for Infrastructure Development

Purpose

This post demonstrates how to use the Cloud Architect skill in Claude Code for infrastructure development tasks.

When I started working with cloud infrastructure, I needed guidance on architecture patterns, deployment strategies, and best practices. The Cloud Architect skill helps with these decisions by providing specialized knowledge when working on infrastructure-related tasks.

Environment

  • Claude Code with claude-skills plugin
  • Cloud platforms (AWS, Azure, GCP)
  • Infrastructure as Code tools (Terraform, Pulumi, AWS CDK)
  • Container orchestration (Kubernetes, Docker)

The Cloud Architect Skill

The Cloud Architect skill in Claude Code provides specialized guidance for infrastructure development and cloud architecture decisions.

There are 4 main areas it helps with:

  • Infrastructure Design: System architecture and deployment patterns
  • Cloud Platform Selection: Choosing the right services for your needs
  • Best Practices: Security, scalability, and reliability patterns
  • Cost Optimization: Resource planning and cost management

We will use the Cloud Architect skill to get guidance on infrastructure decisions.

When to Use Cloud Architect

The Cloud Architect skill activates automatically when you work on infrastructure-related tasks. Here are common scenarios:

1. New Infrastructure Setup

"I need to set up a scalable web application infrastructure on AWS"

2. Architecture Review

"Review this Terraform configuration for best practices"

3. Migration Planning

"Help me plan the migration from monolith to microservices"

4. Cost Optimization

"Analyze my current infrastructure costs and suggest optimizations"

Installation and Setup

To use Cloud Architect, you need the claude-skills plugin installed:

Terminal window
# Install claude-skills
npm install -g claude-skills
# Verify installation
claude-skills --version

The Cloud Architect skill is part of the core skills package and activates automatically when you work on infrastructure tasks.

Practical Example 1: Designing a Web Application Infrastructure

When I asked Cloud Architect to help design infrastructure for a web application:

"I need to design infrastructure for a SaaS application with 10,000 users. Requirements: high availability, auto-scaling, database replication."

Cloud Architect provided this architecture recommendation:

┌─────────────────────────────────────────────────────┐
Route 53 / DNS
┌────────┴────────┐
│ CloudFlare │
│ CDN/WAF │
└────────┬────────┘
┌────────────────┴────────────────┐
│ Application Load Balancer │
└────────────────┬────────────────┘
┌─────────────────┼─────────────────┐
│ │ │
┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ AZ 1 │ │ AZ 2 │ │ AZ 3 │
│ EC2 ASG │ │ EC2 ASG │ │ EC2 ASG │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
└─────────────────┼─────────────────┘
┌────────────┴────────────┐
│ RDS Multi-AZ │
│ Primary + Read Replica │
└─────────────────────────┘

Key recommendations:

  • Use 3 Availability Zones for high availability
  • Application Load Balancer with Auto Scaling Groups
  • RDS with Multi-AZ deployment for database
  • ElastiCache for session management
  • S3 for static assets and backups

Practical Example 2: Infrastructure as Code Review

When I showed Cloud Architect my Terraform configuration:

main.tf
resource "aws_instance" "web" {
ami = "ami-12345678"
instance_type = "t2.micro"
tags = {
Name = "web-server"
}
}
resource "aws_db_instance" "default" {
allocated_storage = 20
storage_type = "standard"
engine = "mysql"
engine_version = "5.7"
instance_class = "db.t2.micro"
name = "mydb"
username = "admin"
password = "password123"
parameter_group_name = "default.mysql5.7"
}

Cloud Architect identified 4 issues:

  1. Hardcoded credentials: Password should use AWS Secrets Manager
  2. Single instance: No high availability or auto-scaling
  3. Storage type: Standard storage is outdated, use gp3
  4. No monitoring: Missing CloudWatch alarms and metrics

It suggested improvements:

# Use secrets manager
data "aws_secretsmanager_secret" "db_credentials" {
name = "prod/db/credentials"
}
data "aws_secretsmanager_secret_version" "db_credentials" {
secret_id = data.aws_secretsmanager_secret.db_credentials.id
}
# Use launch template with ASG
resource "aws_launch_template" "web" {
name_prefix = "web-"
image_id = data.aws_ami.latest.id
instance_type = "t3.micro"
monitoring {
enabled = true
}
}
resource "aws_autoscaling_group" "web" {
desired_capacity = 2
max_size = 4
min_size = 2
vpc_zone_identifier = data.aws_subnets.private.ids
launch_template {
id = aws_launch_template.web.id
version = "$Latest"
}
}
# Use RDS Multi-AZ
resource "aws_db_instance" "default" {
allocated_storage = 20
storage_type = "gp3"
engine = "mysql"
engine_version = "8.0"
instance_class = "db.t3.micro"
multi_az = true
storage_encrypted = true
username = jsondecode(
data.aws_secretsmanager_secret_version.db_credentials.secret_string
)["username"]
password = jsondecode(
data.aws_secretsmanager_secret_version.db_credentials.secret_string
)["password"]
}

Practical Example 3: Kubernetes Cluster Setup

When I needed to set up a Kubernetes cluster:

"I need to set up a Kubernetes cluster for a microservices application. 5 services, expected traffic: 1000 RPS per service."

Cloud Architect guided me through this approach:

cluster-config.yaml
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: production-cluster
region: us-west-2
version: "1.28"
managedNodeGroups:
- name: primary-nodegroup
instanceType: t3.medium
desiredCapacity: 4
minSize: 2
maxSize: 8
volumeSize: 100
volumeType: gp3
iam:
withAddonPolicies:
autoScaler: true
certManager: true
labels:
role: worker
tags:
Environment: production
CostCenter: engineering
addons:
- name: vpc-cni
version: latest
- name: coredns
version: latest
- name: kube-proxy
version: latest
- name: aws-ebs-csi-driver

Key guidance from Cloud Architect:

  • Start with 4 nodes, scale to 8 based on traffic
  • Use gp3 volumes for better price-performance
  • Enable auto-scaler for dynamic node management
  • Separate node groups for different workload types
  • Use managed node groups to reduce operational overhead

Best Practices

DO ✓

1. Design for Failure

  • Use multiple Availability Zones
  • Implement auto-scaling for compute resources
  • Set up database replication and automated backups
  • Configure health checks and automatic recovery

2. Follow Least Privilege

  • Use IAM roles with minimal required permissions
  • Rotate credentials regularly
  • Implement security groups with specific rules
  • Enable CloudTrail for audit logging

3. Monitor Everything

  • Set up CloudWatch dashboards for key metrics
  • Configure alarms for critical thresholds
  • Log application and infrastructure events
  • Use distributed tracing for microservices

4. Plan for Costs

  • Use reserved instances for steady workloads
  • Implement auto-scaling to reduce idle resources
  • Monitor cost anomalies and set budgets
  • Choose right storage classes for data lifecycle

DON’T ✗

1. Hardcode Configuration Values

Terminal window
# Wrong
REGION="us-west-2"
DB_PASSWORD="mypassword"
# Correct
REGION=${AWS_REGION:-"us-west-2"}
DB_PASSWORD=$(aws secretsmanager get-secret-value --secret-id $SECRET_ARN)

2. Skip Disaster Recovery Planning

  • Define RPO (Recovery Point Objective) and RTO (Recovery Time Objective)
  • Test backup restoration procedures
  • Document disaster recovery runbooks
  • Run disaster recovery drills quarterly

3. Ignore Security Basics

  • Don’t use default security groups (open all ports)
  • Don’t store credentials in code or config files
  • Don’t skip encryption for sensitive data
  • Don’t forget to patch systems regularly

4. Over-Provision Resources

  • Start with minimum viable capacity
  • Scale based on actual metrics, not predictions
  • Use spot instances for non-critical workloads
  • Review and remove unused resources weekly

Cloud Architect works well with these complementary skills:

  1. TDD Guide: Write infrastructure tests before implementation
  2. Security Review: Validate infrastructure security configurations
  3. Backend Patterns: Design services that fit your infrastructure
  4. DevOps Practices: Implement CI/CD pipelines for infrastructure

Summary

In this post, I showed how to use the Cloud Architect skill in Claude Code for infrastructure development. The key point is knowing when to invoke this skill - during architecture design, infrastructure reviews, and migration planning.

Cloud Architect helps you make better infrastructure decisions by providing specialized knowledge on cloud platforms, best practices, and cost optimization. Use it when you need guidance on architecture design, infrastructure code reviews, or deployment strategies.

The skill integrates seamlessly with your workflow, activating automatically when you work on infrastructure-related tasks. Combine it with other skills like Security Review and TDD Guide for comprehensive infrastructure development.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments