AWS Builder Center

AWS MCP Servers (Part 2): From Infrastructure as Code to Infrastructure as Conversation

Transform infrastructure management with AI-powered AWS MCP Servers. Learn to deploy CloudFormation, CDK, Terraform, EKS, ECS, and serverless applications through natural language conversations — with built-in security scanning, troubleshooting workflows, and production-ready patterns.

AI Engineer | AWS Community Builder
Welcome to Part 2 of our AWS MCP Servers series! In  Part 1  we explored the foundational servers for documentation and getting started. Now we dive into the servers that transform how you build, deploy, and manage AWS infrastructure.
This post covers three critical categories:
  • Infrastructure as Code (IaC) — CDK, CloudFormation, Terraform, and Cloud Control API
  • Container Platforms — EKS, ECS, and Finch
  • Serverless & Functions — Lambda, Step Functions, and SAM
These MCP servers don't just help you write infrastructure code — they fundamentally change the development experience from static template authoring to dynamic, AI-assisted conversations.

The Paradigm Shift: Infrastructure as Conversation

Traditional IaC workflow:
Developer → Write YAML/HCL → Validate → Debug → Deploy → Troubleshoot → Repeat

AI-assisted IaC workflow with MCP:
Developer → Describe Intent → AI Generates + Validates + Scans → Review → Deploy

The key difference? Context-aware assistance at every step — from initial design through production troubleshooting.

🏗️ Infrastructure as Code MCP Servers

1. AWS IaC MCP Server

The unified toolkit for CloudFormation and CDK development
The AWS IaC MCP Server consolidates infrastructure-as-code capabilities into a single, powerful server that helps you validate, troubleshoot, and follow best practices.

Key Capabilities

Feature
Description
Template Validation
Syntax and schema validation using cfn-lint with specific fix suggestions
Compliance Checking
Security validation against AWS Guard Rules Registry
Deployment Troubleshooting
Pattern matching against 30+ known failure cases
CloudFormation Docs Search
Access to resource types, properties, and syntax
CDK Documentation
API references, best practices, and code samples
CDK Constructs
Find community constructs across TypeScript, Python, Java, C#, Go

Available Tools

Tool Name
Purpose / Description
validate_cloudformation_template
Validate syntax & schema
check_cloudformation_template_compliance
Security compliance
troubleshoot_cloudformation_deployment
Diagnose deployment failures
search_cloudformation_documentation
Find CloudFormation resource docs
search_cdk_documentation
CDK API & best practices
search_cdk_samples_and_constructs
Code examples & patterns
cdk_best_practices
Security & dev guidelines
read_iac_documentation_page
Full documentation page content

Configuration

{
"mcpServers": {
"awslabs.aws-iac-mcp-server": {
"command": "uvx",
"args": ["awslabs.aws-iac-mcp-server@latest"],
"env": {
"AWS_PROFILE": "your-profile",
"FASTMCP_LOG_LEVEL": "ERROR"
}
}
}
}


Real-World Scenario: Debugging a Failed Deployment

The Problem: Your CloudFormation stack failed with a cryptic error during a production deployment at 2 AM.
Traditional Approach:
  1. Log into AWS Console
  1. Navigate to CloudFormation → Stack Events
  1. Scroll through hundreds of events
  1. Cross-reference with CloudTrail
  1. Google the error message
  1. Hope Stack Overflow has the answer
With AWS IaC MCP Server:
"Troubleshoot my CloudFormation stack named 'prod-api-stack' in us-east-1"

The server:
  • Analyzes stack events and identifies the root cause
  • Matches against 30+ known failure patterns
  • Provides CloudTrail deep links for audit trail
  • Suggests specific resolution steps

2. AWS Cloud Control API MCP Server

Direct resource management through natural language
The Cloud Control API MCP Server enables LLMs to create and manage over 1,100 AWS resources directly through natural language, with built-in security scanning and IaC best practices.

Security-First Architecture

This server implements a token-based workflow that prevents AI agents from bypassing security checks:


Key Features

Feature
Description
1,100+ Resource Types
Create any AWS resource supported by Cloud Control API
Checkov Integration
Security scanning before resource creation
Credential Awareness
Always displays account ID and region before changes
Deletion Safeguards
Double confirmation required for deletions
Policy Restrictions
Blocks overly permissive IAM policies
Template Generation
Generate CloudFormation from existing resources
Read-Only Mode
 --readonly  flag for safe exploration

Available Tools

# Core workflow tools
check_environment_variables() # Verify AWS credentials
get_aws_session_info() # Get account/region info
generate_infrastructure_code() # Prepare resource properties
explain() # Human-readable explanation
run_checkov() # Security scanning
# CRUDL operations
create_resource() # Create AWS resource
get_resource() # Read resource details
update_resource() # Modify existing resource
delete_resource() # Remove resource (with safeguards)
list_resources() # Enumerate resources
# Utilities
get_resource_schema_information() # CloudFormation schema
create_template() # Generate IaC from resources

Configuration

{
"mcpServers": {
"awslabs.ccapi-mcp-server": {
"command": "uvx",
"args": ["awslabs.ccapi-mcp-server@latest"],
"env": {
"AWS_PROFILE": "your-profile",
"SECURITY_SCANNING": "enabled",
"DEFAULT_TAGS": "enabled",
"FASTMCP_LOG_LEVEL": "ERROR"
}
}
}
}

Real-World Scenario: Rapid Prototyping

The Problem: You need to quickly prototype a three-tier architecture for a demo tomorrow.
With Cloud Control API MCP Server:
"Create a VPC with public and private subnets, an Application Load Balancer,
and an RDS PostgreSQL instance with encryption enabled"
The server:
  1. Validates your credentials and shows target account
  1. Generates infrastructure code with security best practices
  1. Explains exactly what will be created
  1. Runs Checkov security scan
  1. Creates resources with automatic tagging
  1. Optionally generates CloudFormation template for future use.

3. AWS Terraform MCP Server

Terraform workflows with integrated security scanning
For teams using Terraform, this MCP server provides AWS-specific best practices, Checkov integration, and direct workflow execution.

Key Features

Feature
Description
AWS Best Practices
Well-Architected guidance for Terraform
AWSCC Provider Priority
Recommends AWSCC for consistent API behavior
Checkov Integration
Security scanning with auto-fix capabilities
Terraform Execution
Run init, plan, validate, apply, destroy
Terragrunt Support
Full Terragrunt workflow execution
AWS-IA GenAI Modules
Specialized modules for AI/ML workloads
Registry Analysis
Analyze Terraform Registry modules

Available Resources

terraform://workflow_guide # Security-focused development process
terraform://aws_best_practices # AWS-specific guidance
terraform://aws_provider_resources_listing # AWS provider resources
terraform://awscc_provider_resources_listing # AWSCC provider resources


Configuration

{
"mcpServers": {
"awslabs.terraform-mcp-server": {
"command": "uvx",
"args": ["awslabs.terraform-mcp-server@latest"],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR"
}
}
}
}


Real-World Scenario: Security-First Terraform Development

The Problem: Your security team requires all Terraform code to pass security scans before deployment.
With Terraform MCP Server:
"Create a Terraform configuration for an S3 bucket with versioning,
encryption, and public access blocked. Run security scan before showing me the code."

The server:
  1. Generates Terraform code following AWS best practices
  1. Prioritizes AWSCC provider for better security defaults
  1. Runs Checkov scan automatically
  1. Provides remediation guidance for any issues
  1. Outputs validated, security-compliant code

4. AWS CloudFormation MCP Server

Direct CloudFormation resource management via Cloud Control API
The AWS CloudFormation MCP Server provides direct access to CloudFormation resource management, complementing the IaC MCP Server for teams that need lower-level control.

Key Features

Feature
Description
Direct Resource Management
Create, read, update, delete CloudFormation resources
Cloud Control API Integration
Leverages AWS Cloud Control API for consistent operations
1,100+ Resource Types
Support for all CloudFormation resource types
Lower-Level Control
Granular resource manipulation beyond template-based workflows
Resource Schema Access
Query CloudFormation resource schemas and properties
Template Generation
Generate CloudFormation templates from existing resources

Available Tools

# Resource Operations
create_resource() # Create CloudFormation resource
get_resource() # Read resource details
update_resource() # Modify existing resource
delete_resource() # Remove resource
list_resources() # Enumerate resources by type

# Schema & Documentation
get_resource_schema_information() # CloudFormation resource schema
create_template() # Generate template from resources


Configuration

{
"mcpServers": {
"awslabs.cloudformation-mcp-server": {
"command": "uvx",
"args": ["awslabs.cloudformation-mcp-server@latest"],
"env": {
"AWS_PROFILE": "your-profile",
"AWS_REGION": "us-east-1",
"FASTMCP_LOG_LEVEL": "ERROR"
}
}
}
}


Real-World Scenario: Direct Resource Manipulation

The Problem: You need to quickly create and modify specific CloudFormation resources without managing full stack templates.
With CloudFormation MCP Server:
"Create an AWS::S3::Bucket resource with versioning enabled and
then generate a CloudFormation template from it"

The server:
  1. Creates the S3 bucket resource directly via Cloud Control API
  1. Configures versioning as specified
  1. Generates a reusable CloudFormation template
  1. Returns resource ARN and template for future deployments

When to Use

  • Direct Resource Operations: Need to create/modify individual resources without full stack management
  • CloudFormation-Specific Workflows: Working exclusively with CloudFormation (not CDK or Terraform)
  • Lower-Level Control: Require granular control beyond the comprehensive IaC MCP Server
  • Resource Schema Exploration: Need to query CloudFormation resource schemas and properties
  • Template Generation: Want to generate templates from existing resources



🐳Container Platform MCP Servers

5. Amazon EKS MCP Server

AI-powered Kubernetes cluster management
The Amazon EKS MCP Server is a fully managed service that enables AI-powered experiences for EKS cluster management, application deployment, troubleshooting, and documentation access.

Key Capabilities

Capability
Description
Cluster Management
Create, configure, and manage EKS clusters
Resource Management
Deploy apps, manage K8s resources, inspect state
Troubleshooting
Diagnose issues with integrated runbooks
Documentation
Search and retrieve EKS docs contextually
Private Cluster Support
Works with both private and public clusters

Available Tools

Read-Only Tools:
search_eks_documentation() # Search EKS docs for guidance
search_eks_troubleshooting_guide() # Find troubleshooting info
describe_eks_resource() # Get resource details
list_eks_resources() # List clusters, nodegroups, addons
get_eks_insights() # Optimization recommendations
get_eks_vpc_config() # VPC and network configuration
get_k8s_events() # Kubernetes events for resources
get_pod_logs() # Container logs with filtering
list_api_versions() # Available K8s API versions
list_k8s_resources() # List any K8s resource type
read_k8s_resource() # Detailed resource information
generate_app_manifest() # Generate deployment manifests

Write Tools (when enabled):
# Create clusters, deploy applications, manage resources


Configuration

{
"mcpServers": {
"eks-mcp": {
"disabled": false,
"type": "stdio",
"command": "uvx",
"args": [
"mcp-proxy-for-aws@latest",
"https://eks-mcp.us-east-1.api.aws/mcp",
"--service", "eks-mcp",
"--profile", "default",
"--region", "us-east-1"
]
}
}
}


Real-World Scenario: Kubernetes Troubleshooting

The Problem: Pods in your production namespace are failing to start, and you're getting paged at midnight.
Traditional Approach:
kubectl get pods -n production
kubectl describe pod failing-pod-xyz -n production
kubectl logs failing-pod-xyz -n production
kubectl get events -n production
# ... hours of debugging

With EKS MCP Server:
"Why is my nginx-ingress-controller pod failing to start in the production namespace?"

The server:
  • Fetches pod status and events
  • Retrieves container logs
  • Searches troubleshooting guides
  • Provides specific resolution steps

Example Prompts

# Exploration
"Show me all EKS clusters and their status"
"What insights does EKS have about my production-cluster?"
"List all deployments in the production namespace"

# Troubleshooting
"Show me pods that are not in Running state"
"Get the logs from the api-server pod in the last 30 minutes"
"Search the EKS troubleshooting guide for pod networking issues"

# Deployment (write mode)
"Create a new EKS cluster named demo-cluster with VPC and Auto Mode"
"Deploy my containerized app from ECR to production with 3 replicas"

6. Amazon ECS MCP Server

Full lifecycle management for containerized applications
The Amazon ECS MCP Server provides end-to-end support for containerizing applications, deploying to ECS, troubleshooting, and managing resources.

Key Features

Feature
Description
Containerization Guidance
Best practices for containerizing web apps
ECS Express Mode
Automatic infrastructure provisioning
ECR Integration
Automated repository creation and image builds
Load Balancer Setup
ALB configuration with HTTPS support
Auto-scaling
Built-in scaling with configurable targets
Circuit Breaker
Deployment protection with automatic rollback
Container Insights
Enhanced monitoring integration
AWS Knowledge Proxy
Integrated documentation access

Available Tools

Express Mode Deployment:
containerize_app() # Generate Dockerfile with best practices
build_and_push_image_to_ecr() # Create ECR repo, build, push image
validate_ecs_express_mode_prerequisites() # Check roles and images
wait_for_service_ready() # Poll until tasks are running
delete_app() # Clean up deployment

Troubleshooting:
ecs_troubleshooting_tool() # Consolidated diagnostics
- get_ecs_troubleshooting_guidance # Initial assessment
- fetch_cloudformation_status # Infrastructure diagnostics
- fetch_service_events # Service-level issues
- fetch_task_failures # Task-level problems
- fetch_task_logs # Application logs
- detect_image_pull_failures # Container image issues
- fetch_network_configuration # VPC, subnets, security groups

Resource Management:
ecs_resource_management() # CRUD operations on ECS resources
- List/Describe clusters, services, tasks
- Create/Update/Delete resources (with ALLOW_WRITE=true)
- Run/Start/Stop tasks


Security Controls

{
"env": {
"ALLOW_WRITE": "false", // Disable write operations (default)
"ALLOW_SENSITIVE_DATA": "false" // Restrict log access (default)
}
}


Configuration

{
"mcpServers": {
"awslabs.ecs-mcp-server": {
"command": "uvx",
"args": ["--from", "awslabs-ecs-mcp-server", "ecs-mcp-server"],
"env": {
"AWS_PROFILE": "your-profile",
"AWS_REGION": "us-east-1",
"ALLOW_WRITE": "false",
"ALLOW_SENSITIVE_DATA": "false"
}
}
}
}


Real-World Scenario: Containerizing a Legacy Application

The Problem: You need to containerize a Node.js application and deploy it to ECS with proper load balancing and auto-scaling.
With ECS MCP Server:
"Containerize this Node.js app and deploy it to AWS using Express Mode
with auto-scaling from 2 to 10 instances based on CPU utilization"

The server:
  1. Generates optimized Dockerfile with best practices
  1. Creates ECR repository via CloudFormation
  1. Builds and pushes Docker image
  1. Validates prerequisites (IAM roles, images)
  1. Deploys with Express Mode (automatic ALB, auto-scaling)
  1. Returns public URL for immediate access



⚡ Serverless & Functions MCP Servers

8. AWS Serverless MCP Server

Complete serverless application lifecycle with SAM CLI
The AWS Serverless MCP Server combines AI assistance with serverless expertise to streamline how developers build serverless applications throughout the entire lifecycle.

Key Benefits

Benefit
Description
AI-Powered Development
Rich context for AI assistants aligned with best practices
Comprehensive Tooling
Init, build, deploy, monitor, troubleshoot
Architecture Guidance
Optimal serverless patterns for your needs
Operational Best Practices
Security, performance, cost optimization
Security-First
Read-only defaults, controlled sensitive data access

Feature Categories

1. Serverless Application Lifecycle
  • Initialize, build, deploy SAM applications
  • Test Lambda functions locally and remotely
2. Web Application Deployment
  • Deploy full-stack, frontend, backend apps
  • Lambda Web Adapter for standard frameworks (Express, Next.js)
  • Custom domain setup with ACM and Route 53
3. Observability
  • Retrieve logs and metrics
  • CloudWatch integration
4. Guidance & Templates
  • Lambda use-case guidance
  • IaC framework selection
  • Sample SAM templates from Serverless Land
  • EventBridge schema registry integration

Available Tools

SAM Lifecycle:
sam_init() # Initialize new SAM project
sam_build() # Build serverless application
sam_deploy() # Deploy to AWS CloudFormation
sam_logs() # Fetch CloudWatch logs
sam_local_invoke() # Test Lambda locally

Web Application:
deploy_webapp() # Deploy full-stack/frontend/backend
configure_domain() # Custom domain with ACM/Route53
update_webapp_frontend() # Update frontend assets
get_metrics() # CloudWatch metrics

Guidance:
get_iac_guidance() # IaC platform selection
get_lambda_guidance() # Lambda suitability assessment
get_lambda_event_schemas() # Event source schemas
get_serverless_templates() # Sample templates
deploy_serverless_app_help() # Deployment instructions

Event Source Mapping (ESM):
esm_guidance() # Setup, networking, troubleshooting
esm_kafka_troubleshoot() # Kafka-specific diagnostics
esm_optimize() # Configuration optimization

Schema Tools:
list_registries() # EventBridge registries
search_schema() # Find schemas by keyword
describe_schema() # Get schema definition


Configuration

{
"mcpServers": {
"awslabs.aws-serverless-mcp-server": {
"command": "uvx",
"args": [
"awslabs.aws-serverless-mcp-server@latest",
"--allow-write",
"--allow-sensitive-data-access"
],
"env": {
"AWS_PROFILE": "your-profile",
"AWS_REGION": "us-east-1"
}
}
}
}


Real-World Scenario: Building a Todo API

The Problem: You want to build a simple backend for a todo app using Python and deploy it to AWS Serverless.
With Serverless MCP Server:
"I want to build a simple backend for a todo app using Python and deploy it
to the cloud with AWS Serverless. Create a new project called my-todo-app
with basic functionality to add and list todos. Build and deploy it with
all necessary permissions."

The server:
  1. Initializes SAM project with Python runtime
  1. Generates Lambda function code for todo operations
  1. Creates API Gateway configuration
  1. Sets up DynamoDB table for persistence
  1. Builds the application
  1. Deploys with CAPABILITY_IAM permissions
  1. Returns API endpoint URL

Real-World Scenario: Event Source Mapping Optimization

The Problem: Your Kafka ESM is experiencing high latency and you need to optimize for throughput.
With Serverless MCP Server:
"I have an ESM with UUID abc-123 in us-east-1. My target throughput is
10-100 MB/s. Create a SAM template to optimize the ESM configuration for cost."

The server:
  1. Analyzes current configuration trade-offs
  1. Identifies optimization opportunities
  1. Validates proposed changes
  1. Generates optimized SAM template

9. AWS Lambda Tool MCP Server

Execute Lambda functions as AI tools
The Lambda Tool MCP Server acts as a bridge between MCP clients and AWS Lambda functions, allowing AI models to access and run Lambda functions as tools without code changes.

Architecture



Key Benefits

Benefit
Description
Private Resource Access
Access internal apps and databases without public exposure
Segregation of Duties
Model invokes functions but can't access services directly
No Code Changes
Existing Lambda functions work as MCP tools
Schema Support
EventBridge Schema Registry for input validation
Flexible Selection
Filter functions by prefix, list, or tags

Configuration

{
"mcpServers": {
"awslabs.lambda-tool-mcp-server": {
"command": "uvx",
"args": ["awslabs.lambda-tool-mcp-server@latest"],
"env": {
"AWS_PROFILE": "your-profile",
"AWS_REGION": "us-east-1",
"FUNCTION_PREFIX": "mcp-tool-",
"FUNCTION_LIST": "get-customer,update-order",
"FUNCTION_TAG_KEY": "mcp-enabled",
"FUNCTION_TAG_VALUE": "true"
}
}
}
}


Real-World Scenario: CRM Integration

The Problem: You want your AI assistant to query your internal CRM system, but it's in a private VPC with no public access.
Solution with Lambda Tool MCP Server:
  1. Create a Lambda function in your VPC:
def handler(event, context):
customer_id = event.get('customerId')
# Query internal CRM database
return {"status": "active", "tier": "premium"}

  1. Set function description (used as MCP tool description):
Retrieve customer status from CRM based on { 'customerId' } or { 'customerEmail' }

  1. Tag the function:
mcp-enabled: true

  1. Configure the MCP server with the tag filter
Now your AI assistant can:
"What's the status of customer ID 12345 in our CRM?"

The model invokes the Lambda function, which queries the private database and returns results — all without exposing the CRM to the public internet.

10. AWS Step Functions Tool MCP Server

Execute complex workflows and business processes
The Step Functions Tool MCP Server acts as a bridge between MCP clients and AWS Step Functions state machines, allowing AI models to execute and manage complex, multi-step business processes that coordinate operations across multiple AWS services—without requiring any modifications to existing workflow definitions.

Key Features

Feature
Description
No Code Changes
Existing state machines work as MCP tools immediately
Standard & Express Workflows
Supports both long-running and high-volume execution patterns
Schema Integration
EventBridge Schema Registry for input validation and documentation
Comprehensive Documentation
Combines state machine descriptions, workflow comments, and JSON schemas
IAM-Based Security
Segregation of duties—models invoke workflows, state machines access AWS services
Flexible Selection
Filter state machines by prefix, list, or tags

Architecture



Available Tools

The server automatically exposes your state machines as MCP tools based on your configuration filters. Each state machine becomes a callable tool with:
# Automatically generated tools based on your state machines
execute_<state_machine_name>() # Start execution with input parameters
get_execution_status() # Monitor workflow progress
retrieve_execution_results() # Get workflow outputs


Configuration

{
"mcpServers": {
"awslabs.stepfunctions-tool-mcp-server": {
"command": "uvx",
"args": ["awslabs.stepfunctions-tool-mcp-server@latest"],
"env": {
"AWS_PROFILE": "your-aws-profile",
"AWS_REGION": "us-east-1",
"STATE_MACHINE_PREFIX": "mcp-",
"STATE_MACHINE_LIST": "order-fulfillment,customer-onboarding",
"STATE_MACHINE_TAG_KEY": "mcp-enabled",
"STATE_MACHINE_TAG_VALUE": "true",
"STATE_MACHINE_INPUT_SCHEMA_ARN_TAG_KEY": "input-schema-arn"
}
}
}
}

Windows Configuration:
{
"mcpServers": {
"awslabs.stepfunctions-tool-mcp-server": {
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "uv",
"args": [
"tool",
"run",
"--from",
"awslabs.stepfunctions-tool-mcp-server@latest",
"awslabs.stepfunctions-tool-mcp-server.exe"
],
"env": {
"AWS_PROFILE": "your-aws-profile",
"AWS_REGION": "us-east-1"
}
}
}
}


Tool Documentation Strategy

The server builds comprehensive tool documentation by combining multiple sources:
1. State Machine Description (base tool description):
Retrieve customer status from CRM based on { 'customerId' } or { 'customerEmail' }

2. Workflow Comment (adds context):
{
"Comment": "This workflow first looks up customer ID from email, then retrieves their info",
"StartAt": "GetCustomerId",
"States": { ... }
}

3. EventBridge Schema Registry (formal input definition):
  • Create JSON Schema in EventBridge Schema Registry
  • Tag state machine with schema ARN
  • Server automatically includes schema in tool documentation
Combined Result:
Retrieve customer status from CRM based on { 'customerId' } or { 'customerEmail' }

Workflow Description: This workflow first looks up customer ID from email, then retrieves their info

Input Schema:
{
"type": "object",
"properties": {
"customerId": { "type": "string" },
"customerEmail": { "type": "string" }
}
}


Real-World Scenario: Order Processing Workflow

The Problem: You have a complex order fulfillment workflow in Step Functions that needs to be triggered through AI conversations.
Setup:
  1. State machine description:  Process customer orders with inventory check, payment, and shipping 
  1. Tag state machine:  mcp-enabled: true 
  1. Configure MCP server with tag filter
With Step Functions Tool MCP Server:
"Start the order fulfillment workflow for order ID 12345 with priority shipping"

The server:
  1. Identifies the order-fulfillment state machine
  1. Validates input against EventBridge schema (if configured)
  1. Starts execution with provided parameters
  1. Returns execution ARN and tracks progress
Follow-up:
"What's the status of that order?"

The server retrieves execution status, completed steps, and current state.

Workflow Type Support

Workflow Type
Best For
Execution Model
Standard
Long-running processes requiring status tracking
Asynchronous, up to 1 year
Express
High-volume, short-duration tasks
Synchronous/Asynchronous, up to 5 minutes

Segregation of Duties:

  • MCP Server: Needs permissions to invoke state machines
  • State Machines: Have their own IAM roles to access AWS services
  • AI Models: Can only invoke workflows through MCP server, no direct AWS access
This creates a secure boundary where models trigger workflows but don't access AWS services directly.

Best Practices

  1. Use Descriptive Names: State machine descriptions become tool descriptions—make them detailed
  1. Add Workflow Comments: Document purpose, steps, and logic in the  Comment  field
  1. Leverage Schema Registry: Provide formal JSON Schema definitions for inputs
  1. Filter Strategically: Use  STATE_MACHINE_LIST ,  STATE_MACHINE_PREFIX , or tags to control which workflows are exposed
  1. Tag Schema ARNs: Link state machines to their input schemas via tags

Selection Filters

Configure which state machines become MCP tools:
Filter
Purpose
Example
STATE_MACHINE_PREFIX
Filter by name prefix
mcp- exposes only state machines starting with "mcp-"
STATE_MACHINE_LIST
Explicit list of names
order-fulfillment,customer-onboarding
STATE_MACHINE_TAG_KEY + VALUE
Filter by tags
Key: mcp-enabled, Value: true
Note: If both prefix and list are empty, all state machines pass the name check. Tag filtering is applied after name filtering.

Example Prompts

# Execute workflows
"Process order 12345 through the order-fulfillment workflow with express shipping"
"Start customer onboarding for user john@example.com"

# Monitor executions
"What's the status of the data processing workflow I just started?"
"Show me the results of the last customer onboarding execution"

# Business operations
"Run the monthly report generation workflow for January 2024"
"Execute the inventory reconciliation process for warehouse A"



🎯 Production Scenarios: Putting It All Together

Scenario 1: Multi-Region Disaster Recovery Setup

Challenge: Set up a disaster recovery environment in a secondary region with automated failover.
MCP Servers Used:
  • AWS IaC MCP Server (template validation)
  • Cloud Control API MCP Server (resource creation)
  • EKS MCP Server (cluster management)
Conversation Flow:
You: "I need to set up disaster recovery for my production EKS cluster
in us-east-1 to us-west-2 with automated failover"

AI: [Uses AWS Knowledge MCP to research DR best practices]
[Uses EKS MCP to analyze current cluster configuration]
[Uses Cloud Control API to create DR infrastructure]
[Uses IaC MCP to validate and generate CloudFormation templates]
"I've analyzed your production cluster and created a DR plan:
1. Secondary EKS cluster in us-west-2 with matching configuration
2. Route 53 health checks with automatic failover
3. Cross-region ECR replication for container images
4. RDS read replica promotion strategy
Here's the CloudFormation template for review..."


Scenario 2: Serverless Event-Driven Architecture

Challenge: Build an event-driven order processing system with multiple Lambda functions, SQS queues, and DynamoDB.
MCP Servers Used:
  • AWS Serverless MCP Server (SAM development)
  • Lambda Tool MCP Server (function testing)
  • AWS IaC MCP Server (template validation)
Conversation Flow:
You: "Create an event-driven order processing system with:
- API Gateway for order submission
- Lambda for order validation
- SQS for order queue
- Lambda for order processing
- DynamoDB for order storage
- SNS for order notifications"

AI: [Uses Serverless MCP to get architecture guidance]
[Generates SAM template with all components]
[Uses IaC MCP to validate template]
[Uses Serverless MCP to deploy]
"I've created your order processing system:
- API endpoint: https://xxx.execute-api.us-east-1.amazonaws.com/prod/orders
- Order validation Lambda with schema validation
- Dead letter queue for failed orders
- DynamoDB with on-demand capacity
- SNS topic for order status notifications
The system handles 1000+ orders/second with automatic scaling."


Scenario 3: Container Migration from EC2 to ECS

Challenge: Migrate a legacy application running on EC2 to containerized ECS deployment.
MCP Servers Used:
  • ECS MCP Server (containerization and deployment)
  • AWS IaC MCP Server (infrastructure validation)
  • Cloud Control API MCP Server (resource management)
Conversation Flow:
You: "Help me migrate my Node.js application from EC2 to ECS.
It currently runs on 4 t3.large instances behind an ALB."

AI: [Uses ECS MCP containerize_app to generate Dockerfile]
[Analyzes current EC2 configuration]
[Uses ECS MCP to create ECR repository and push image]
[Deploys with Express Mode matching current capacity]
"Migration complete:
- Dockerfile optimized for Node.js with multi-stage build
- Image pushed to ECR: 123456789.dkr.ecr.us-east-1.amazonaws.com/my-app:v1
- ECS service running with 4 tasks (matching previous capacity)
- ALB configured with health checks
- Auto-scaling: 2-8 tasks based on CPU (70% target)
- Cost savings: ~30% compared to EC2 (Fargate Spot)
Application URL: https://my-app-alb-123.us-east-1.elb.amazonaws.com"




📊 Quick Reference: Which Server to Use?

Use Case
Recommended Server(s)
Validate CloudFormation templates
AWS IaC MCP Server
Debug failed deployments
AWS IaC MCP Server
Create AWS resources via natural language
Cloud Control API MCP Server
Terraform development
Terraform MCP Server
Manage EKS clusters
Amazon EKS MCP Server
Containerize and deploy to ECS
Amazon ECS MCP Server
Build serverless applications
AWS Serverless MCP Server
Access private resources via Lambda
Lambda Tool MCP Server
Orchestrate workflows
Step Functions MCP Server

Thank You for Reading!

Thank you for reading till the end! I hope this guide empowers you to build and deploy AWS infrastructure more efficiently with AI assistance.

Summary

In this second part of our AWS MCP Servers series, we explored the infrastructure and deployment servers that transform how you build and manage AWS resources:
Category
Servers
Key Capability
Infrastructure as Code
IaC, Cloud Control API, Terraform, CloudFormation
Template validation, security scanning, resource management
Container Platforms
EKS, ECS, Finch
Cluster management, containerization, deployment
Serverless
Serverless, Lambda Tool, Step Functions
SAM lifecycle, function execution, workflow orchestration
The key takeaway: These servers don't just help you write infrastructure code — they provide context-aware assistance at every step, from initial design through production troubleshooting.



What's Next?

In Part 3: AI & Machine Learning, we'll explore the MCP servers that power AI/ML workloads:
  • Amazon Bedrock Knowledge Base Retrieval MCP Server
  • Amazon SageMaker AI MCP Server
  • Amazon Nova Canvas MCP Server
  • Document Loader MCP Server
  • And more!



Resources

Happy building! 🚀
Found this helpful? Share it with your team!


Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article