PromptShop

Aws Solution Architect

designs scalable and cost-effective AWS architectures for startups, providing infrastructure-as-code templates. It gathers requirements, recommends architect...

Install

npx promptshop add aws-solution-architect

Details

What This Skill Does

  • This skill designs scalable and cost-effective AWS architectures for startups, providing infrastructure-as-code templates.
  • It gathers requirements, recommends architecture patterns, and generates IaC templates.
  • It's useful for teams looking to quickly deploy applications on AWS following best practices.

When to Use

  • Design AWS architecture for a web app.
  • Design AWS architecture for a mobile backend.
  • Design AWS architecture for a data pipeline.
  • Design AWS architecture for a SaaS application.
  • Estimate AWS costs for a new project.
  • Generate Cloud Formation templates for AWS resources.

Key Features

  • Gathers application requirements for AWS deployment.
  • Recommends AWS architecture patterns.
  • Estimates monthly AWS costs.
  • Generates infrastructure-as-code templates.
  • Supports serverless, microservices, and three-tier architectures.
  • Provides Cloud Formation YAML output.

Manual Installation

Design scalable, cost-effective AWS architectures for startups with infrastructure-as-code templates.

Workflow

Step 1: Gather Requirements

Collect application specifications:

  • Application type (web app, mobile backend, data pipeline, SaaS) Expected users and requests per second Budget constraints (monthly spend limit) Team size and AWS experience level Compliance requirements (GDPR, HIPAA, SOC 2) Availability requirements (SLA, RPO/RTO)

Step 2: Design Architecture

Run the architecture designer to get pattern recommendations:

python scripts/architecture_designer.py --input requirements.json

Example output:

{ "recommended_pattern": "serverless_web", "service_stack": ["S3", "Cloud Front", "API Gateway", "Lambda", "DynamoDB", "Cognito"], "estimated_monthly_cost_usd": 35, "pros": ["Low ops overhead", "Pay-per-use", "Auto-scaling"], "cons": ["Cold starts", "15-min Lambda limit", "Eventual consistency"] }

Select from recommended patterns: Serverless Web: S3 + Cloud Front + API Gateway + Lambda + DynamoDB Event-Driven Microservices: Event Bridge + Lambda + SQS + Step Functions Three-Tier: ALB + ECS Fargate + Aurora + Elasti Cache GraphQL Backend: App Sync + Lambda + DynamoDB + Cognito

See references/architecture_patterns.md for detailed pattern specifications.

Validation checkpoint: Confirm the recommended pattern matches the team's operational maturity and compliance requirements before proceeding to Step 3.

Step 3: Generate IaC Templates

Create infrastructure-as-code for the selected pattern:

Serverless stack (Cloud Formation)

python scripts/serverless_stack.py --app-name my-app --region us-east-1

Example Cloud Formation YAML output (core serverless resources):

AWSTemplate FormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31

Parameters: App Name: Type: String Default: my-app

Resources: Api Function: Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: nodejs20.x Memory Size: 512 Timeout: 30 Environment: Variables: TABLE_NAME: !Ref Data Table Policies: - DynamoDBCrud Policy: Table Name: !Ref Data Table Events: Api Event: Type: Api Properties: Path: /{proxy+} Method: ANY

Data Table: Type: AWS::DynamoDB::Table Properties: Billing Mode: PAY_PER_REQUEST Attribute Definitions: - Attribute Name: pk Attribute Type: S - Attribute Name: sk Attribute Type: S Key Schema: - Attribute Name: pk Key Type: HASH - Attribute Name: sk Key Type: RANGE

Full templates including API Gateway, Cognito, IAM roles, and Cloud Watch logging are generated by serverless_stack.py and also available in references/architecture_patterns.md.

Example CDK Type Script snippet (three-tier pattern):

import * as ecs from 'aws-cdk-lib/aws-ecs'; import * as ec2 from 'aws-cdk-lib/aws-ec2'; import * as rds from 'aws-cdk-lib/aws-rds';

const vpc = new ec2. Vpc(this, 'App Vpc', { max Azs: 2 });

const cluster = new ecs. Cluster(this, 'App Cluster', { vpc });

const db = new rds. Serverless Cluster(this, 'AppDb', { engine: rds. Database ClusterEngine.aurora Postgres({ version: rds. Aurora PostgresEngine Version. VER_15_2, }), vpc, scaling: { min Capacity: 0.5, max Capacity: 4 }, });

Step 4: Review Costs

Analyze estimated costs and optimization opportunities:

python scripts/cost_optimizer.py --resources current_setup.json --monthly-spend 2000

Example output:

{ "current_monthly_usd": 2000, "recommendations": [ { "action": "Right-size RDS db.r5.2xlarge → db.r5.large", "savings_usd": 420, "priority": "high" }, { "action": "Purchase 1-yr Compute Savings Plan at 40% utilization", "savings_usd": 310, "priority": "high" }, { "action": "Move S3 objects >90 days to Glacier Instant Retrieval", "savings_usd": 85, "priority": "medium" } ], "total_potential_savings_usd": 815 }

Output includes: Monthly cost breakdown by service Right-sizing recommendations Savings Plans opportunities Potential monthly savings

Step 5: Deploy

Deploy the generated infrastructure:

Cloud Formation

aws cloudformation create-stack
--stack-name my-app-stack
--template-body file://template.yaml
--capabilities CAPABILITY_IAM

CDK cdk deploy

Terraform terraform init && terraform apply

Step 6: Validate and Handle Failures

Verify deployment and set up monitoring:

Check stack status

aws cloudformation describe-stacks --stack-name my-app-stack

Set up Cloud Watch alarms aws cloudwatch put-metric-alarm --alarm-name high-errors ...

If stack creation fails:

Check the failure reason: aws cloudformation describe-stack-events
--stack-name my-app-stack
--query 'Stack Events[?Resource Status==CREATE_FAILED]' Review Cloud Watch Logs for Lambda or ECS errors. Fix the template or resource configuration. Delete the failed stack before retrying: aws cloudformation delete-stack --stack-name my-app-stack

Wait for deletion

aws cloudformation wait stack-delete-complete --stack-name my-app-stack

Redeploy

aws cloudformation create-stack ...

Common failure causes: IAM permission errors → verify --capabilities CAPABILITY_IAM and role trust policies Resource limit exceeded → request quota increase via Service Quotas console Invalid template syntax → run aws cloudformation validate-template --template-body file://template.yaml before deploying

Tools

architecture_designer.py

Generates architecture patterns based on requirements.

python scripts/architecture_designer.py --input requirements.json --output design.json

Input: JSON with app type, scale, budget, compliance needs Output: Recommended pattern, service stack, cost estimate, pros/cons

serverless_stack.py

Creates serverless Cloud Formation templates.

python scripts/serverless_stack.py --app-name my-app --region us-east-1

Output: Production-ready Cloud Formation YAML with: API Gateway + Lambda DynamoDB table Cognito user pool IAM roles with least privilege Cloud Watch logging

cost_optimizer.py

Analyzes costs and recommends optimizations.

python scripts/cost_optimizer.py --resources inventory.json --monthly-spend 5000

Output: Recommendations for: Idle resource removal Instance right-sizing Reserved capacity purchases Storage tier transitions NAT Gateway alternatives

Quick Start

MVP Architecture (< $100/month)

Ask: "Design a serverless MVP backend for a mobile app with 1000 users"

Result: Lambda + API Gateway for API DynamoDB pay-per-request for data Cognito for authentication S3 + Cloud Front for static assets Estimated: $20-50/month

Scaling Architecture ($500-2000/month)

Ask: "Design a scalable architecture for a SaaS platform with 50k users"

Result: ECS Fargate for containerized API Aurora Serverless for relational data Elasti Cache for session caching Cloud Front for CDN Code Pipeline