--- name: infra-engineer description: "Comprehensive infrastructure engineering covering DevOps, cloud platforms, FinOps, and DevSecOps. Platforms: AWS (EC2, Lambda, S3, ECS, EKS, RDS, CloudFormation), Azure basics, Cloudflare (Workers, R2, D1, Pages), GCP (GKE, Cloud Run, Cloud Storage), Docker, Kubernetes. Capabilities: CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins), GitOps, infrastructure as code (Terraform, CloudFormation), container orchestration, cost optimization, security scanning, vulnerability management, secrets management, compliance (SOC2, HIPAA). Actions: deploy, configure, manage, scale, monitor, secure, optimize cloud infrastructure. Keywords: AWS, EC2, Lambda, S3, ECS, EKS, RDS, CloudFormation, Azure, Kubernetes, k8s, Docker, Terraform, CI/CD, GitHub Actions, GitLab CI, Jenkins, ArgoCD, Flux, cost optimization, FinOps, reserved instances, spot instances, security scanning, SAST, DAST, vulnerability management, secrets management, Vault, compliance, monitoring, observability. Use when: deploying to AWS/Azure/GCP/Cloudflare, setting up CI/CD pipelines, implementing GitOps workflows, managing Kubernetes clusters, optimizing cloud costs, implementing security best practices, managing infrastructure as code, container orchestration, compliance requirements, cost analysis and optimization." license: MIT version: 2.0.0 --- # Infrastructure Engineering Skill Comprehensive guide for modern infrastructure engineering covering DevOps practices, multi-cloud platforms (AWS, Azure, GCP, Cloudflare), FinOps cost optimization, and DevSecOps security practices. ## When to Use This Skill Use this skill when: - **DevOps**: Setting up CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins), implementing GitOps workflows (ArgoCD, Flux) - **AWS**: Deploying to EC2, Lambda, ECS, EKS, managing S3, RDS, using CloudFormation/CDK - **Azure**: Working with Azure VMs, App Service, AKS, Azure Functions, Storage Accounts - **GCP**: Managing Compute Engine, GKE, Cloud Run, Cloud Storage, App Engine - **Cloudflare**: Deploying Workers, R2 storage, D1 databases, Pages applications - **Kubernetes**: Managing clusters, deployments, services, ingress, Helm charts, operators - **Docker**: Containerizing applications, multi-stage builds, Docker Compose, registries - **FinOps**: Analyzing cloud costs, optimizing spend, reserved instances, spot instances, rightsizing - **DevSecOps**: Security scanning (SAST/DAST), vulnerability management, secrets management, compliance - **IaC**: Terraform, CloudFormation, Pulumi, configuration management - **Monitoring**: Setting up observability, logging, metrics, alerting, distributed tracing ## Platform Selection Guide ### When to Use AWS **Best For:** - General-purpose cloud computing at scale - Mature ecosystem with 200+ services - Enterprise workloads with compliance requirements - Hybrid cloud with AWS Outposts - Extensive third-party integrations - Advanced networking and security controls **Key Services:** - EC2 (virtual machines, flexible compute) - Lambda (serverless functions, event-driven) - ECS/EKS (container orchestration) - S3 (object storage, industry standard) - RDS (managed relational databases) - DynamoDB (NoSQL, global tables) - CloudFormation/CDK (infrastructure as code) - IAM (identity and access management) - VPC (virtual private cloud networking) **Cost Profile:** Pay-as-you-go, reserved instances (up to 72% discount), savings plans, spot instances (up to 90% discount) ### When to Use Azure **Best For:** - Microsoft-centric organizations (.NET, Active Directory) - Hybrid cloud scenarios (Azure Arc, Stack) - Enterprise agreements with Microsoft - Windows Server and SQL Server workloads - Integration with Microsoft 365 and Dynamics - Strong compliance certifications (90+ certifications) **Key Services:** - Virtual Machines (Windows/Linux compute) - App Service (PaaS for web apps) - AKS (managed Kubernetes) - Azure Functions (serverless compute) - Storage Accounts (Blob, File, Queue, Table) - SQL Database (managed SQL Server) - Active Directory (identity management) - ARM Templates/Bicep (infrastructure as code) **Cost Profile:** Pay-as-you-go, reserved instances, Azure Hybrid Benefit for Windows/SQL Server licenses ### When to Use Cloudflare **Best For:** - Edge-first applications with global distribution - Ultra-low latency requirements (<50ms) - Static sites with serverless functions - Zero egress cost scenarios (R2 storage) - WebSocket/real-time applications (Durable Objects) - AI/ML at the edge (Workers AI) **Key Products:** - Workers (serverless functions) - R2 (object storage, S3-compatible) - D1 (SQLite database with global replication) - KV (key-value store) - Pages (static hosting + functions) - Durable Objects (stateful compute) - Browser Rendering (headless browser automation) **Cost Profile:** Pay-per-request, generous free tier, zero egress fees ### When to Use Kubernetes **Best For:** - Container orchestration at scale - Microservices architectures with 10+ services - Multi-cloud and hybrid deployments - Self-healing and auto-scaling workloads - Complex deployment strategies (blue/green, canary) - Service mesh architectures (Istio, Linkerd) - Stateful applications with operators **Key Features:** - Declarative configuration (YAML manifests) - Automated rollouts and rollbacks - Service discovery and load balancing - Self-healing (restarts failed containers) - Horizontal pod autoscaling - Secret and configuration management - Storage orchestration - Batch job execution **Managed Options:** EKS (AWS), AKS (Azure), GKE (GCP), managed k8s providers **Cost Profile:** Cluster management fees + node costs (optimize with spot instances, cluster autoscaling) ### When to Use Docker **Best For:** - Local development consistency - Microservices architectures - Multi-language stack applications - Traditional VPS/VM deployments - Foundation for Kubernetes workloads - CI/CD build environments - Database containerization (dev/test) **Key Capabilities:** - Application isolation and portability - Multi-stage builds for optimization - Docker Compose for multi-container apps - Volume management for data persistence - Network configuration and service discovery - Cross-platform compatibility (amd64, arm64) - BuildKit for improved build performance **Cost Profile:** Infrastructure cost only (compute + storage), no orchestration overhead ### When to Use Google Cloud **Best For:** - Enterprise-scale applications - Data analytics and ML pipelines (BigQuery, Vertex AI) - Hybrid/multi-cloud deployments - Kubernetes at scale (GKE) - Managed databases (Cloud SQL, Firestore, Spanner) - Complex IAM and compliance requirements **Key Services:** - Compute Engine (VMs) - GKE (managed Kubernetes) - Cloud Run (containerized serverless) - App Engine (PaaS) - Cloud Storage (object storage) - Cloud SQL (managed databases) **Cost Profile:** Varied pricing, sustained use discounts, committed use contracts ## Quick Start ### AWS Lambda Function ```bash # Install AWS CLI curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip && sudo ./aws/install # Configure credentials aws configure # Create Lambda function with SAM sam init --runtime python3.11 sam build && sam deploy --guided ``` See: `references/aws-lambda.md` ### AWS EKS Kubernetes Cluster ```bash # Install eksctl brew install eksctl # or curl download # Create cluster eksctl create cluster \ --name my-cluster \ --region us-west-2 \ --nodegroup-name standard-workers \ --node-type t3.medium \ --nodes 3 \ --nodes-min 1 \ --nodes-max 4 ``` See: `references/kubernetes-basics.md` ### Azure Deployment ```bash # Install Azure CLI curl -L https://aka.ms/InstallAzureCli | bash # Login and create resources az login az group create --name myResourceGroup --location eastus az webapp create --resource-group myResourceGroup \ --name myapp --runtime "NODE:18-lts" ``` See: `references/azure-basics.md` ### Cloudflare Workers ```bash # Install Wrangler CLI npm install -g wrangler # Create and deploy Worker wrangler init my-worker cd my-worker wrangler deploy ``` See: `references/cloudflare-workers-basics.md` ### Kubernetes Deployment ```bash # Create deployment kubectl create deployment nginx --image=nginx:latest kubectl expose deployment nginx --port=80 --type=LoadBalancer # Apply from manifest kubectl apply -f deployment.yaml # Check status kubectl get pods,services,deployments ``` See: `references/kubernetes-basics.md` ### Docker Container ```bash # Create Dockerfile cat > Dockerfile <