Comprehensive developer toolkit providing reusable skills for Java/Spring Boot, TypeScript/NestJS/React/Next.js, Python, PHP, AWS CloudFormation, AI/RAG, DevOps, and more.
82
82%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Risky
Do not use without reviewing
This reference guide contains detailed information about AWS CloudFormation resources, intrinsic functions, and configurations for ECS container infrastructure.
Creates an Amazon ECS cluster.
| Property | Type | Required | Description |
|---|---|---|---|
| ClusterName | String | No | The name of the cluster |
| ClusterSettings | List of ClusterSetting | No | The settings for the cluster |
| ServiceConnectDefaults | ServiceConnectDefaults | No | Service Connect configuration |
| Tags | List of Tag | No | Tags for the cluster |
| Property | Type | Description |
|---|---|---|
| Name | String | The setting name (containerInsights) |
| Value | String | The setting value (enabled, disabled) |
Resources:
ECSCluster:
Type: AWS::ECS::Cluster
Properties:
ClusterName: !Sub "${AWS::StackName}-cluster"
ClusterSettings:
- Name: containerInsights
Value: enabled
Tags:
- Key: Environment
Value: !Ref Environment| Attribute | Description |
|---|---|
| Arn | The ARN of the cluster |
| ClusterName | The name of the cluster |
Creates a task definition for ECS.
| Property | Type | Required | Description |
|---|---|---|---|
| Family | String | No | The family name for the task definition |
| Cpu | String | No | The CPU units for the task (128-122880) |
| Memory | String | No | The memory for the task (4-150000 MiB) |
| NetworkMode | String | No | Network mode (none, bridge, awsvpc, host) |
| RequiresCompatibilities | List of String | No | Launch types (EC2, FARGATE) |
| ExecutionRoleArn | String | No | IAM role for task execution |
| TaskRoleArn | String | No | IAM role for task containers |
| TaskRoleArn | String | No | IAM role for task containers |
| Volumes | List of Volume | No | List of volumes |
| ContainerDefinitions | List of ContainerDefinition | Yes | Container definitions |
| InferenceAccelerators | List of InferenceAccelerator | No | Inference accelerators |
| EphemeralStorage | EphemeralStorage | No | Ephemeral storage size (21-200 GB) |
| RuntimePlatform | RuntimePlatform | No | OS/Architecture settings |
| Tags | List of Tag | No | Tags for the task definition |
| Property | Type | Required | Description |
|---|---|---|---|
| Name | String | Yes | The name of the container |
| Image | String | Yes | Docker image URI or ECR URI |
| Cpu | Integer | No | CPU units for the container |
| Memory | Integer | No | Memory hard limit for container |
| MemoryReservation | Integer | No | Memory soft limit for container |
| PortMappings | List of PortMapping | No | Port mappings |
| Essential | Boolean | No | Whether container is essential |
| EntryPoint | List of String | No | Entrypoint |
| Command | List of String | No | Command to run |
| Environment | List of KeyValuePair | No | Environment variables |
| Secrets | List of Secret | No | Secrets from Secrets Manager |
| LogConfiguration | LogConfiguration | No | Logging configuration |
| HealthCheck | HealthCheck | No | Health check configuration |
| DependsOn | List of ContainerDependency | No | Dependencies |
| DisableNetworking | Boolean | No | Disable networking |
| Privileged | Boolean | No | Enable privileged mode |
| ReadonlyRootFilesystem | Boolean | No | Read-only root filesystem |
| Ulimits | List of Ulimit | No | Ulimits |
| WorkingDirectory | String | No | Working directory |
| Property | Type | Description |
|---|---|---|
| ContainerPort | Integer | Port on the container |
| HostPort | Integer | Port on the host instance |
| Protocol | String | Protocol (tcp, udp) |
| Property | Type | Description |
|---|---|---|
| Name | String | Name of the secret |
| ValueFrom | String | ARN of the secret |
| Property | Type | Description |
|---|---|---|
| LogDriver | String | Log driver (json-file, syslog, awslogs, etc.) |
| Options | Map of String | Driver-specific options |
| Property | Type | Description |
|---|---|---|
| Command | List of String | Health check command |
| Interval | Integer | Interval in seconds (5-300) |
| Timeout | Integer | Timeout in seconds (2-60) |
| Retries | Integer | Retry attempts (1-10) |
| StartPeriod | Integer | Start period in seconds (0-300) |
Resources:
TaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
Family: web-app
Cpu: "512"
Memory: "1024"
NetworkMode: awsvpc
RequiresCompatibilities:
- EC2
- FARGATE
ExecutionRoleArn: !Ref TaskExecutionRole
ContainerDefinitions:
- Name: web
Image: nginx:latest
Cpu: 256
Memory: 512
PortMappings:
- ContainerPort: 80
Protocol: tcp
Environment:
- Name: ENV
Value: !Ref Environment
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group: !Ref LogGroup
awslogs-region: !Ref AWS::Region
awslogs-stream-prefix: ecs
HealthCheck:
Command:
- CMD-SHELL
- curl -f http://localhost:80/health || exit 1
Interval: 30
Timeout: 5
Retries: 3| Attribute | Description |
|---|---|
| TaskDefinitionArn | The ARN of the task definition |
| Family | The family name of the task definition |
| Revision | The revision number |
Creates an Amazon ECS service.
| Property | Type | Required | Description |
|---|---|---|---|
| Cluster | String | Yes | ARN or name of the cluster |
| ServiceName | String | No | The name of the service |
| TaskDefinition | String | Yes | ARN or family:revision of task definition |
| DesiredCount | Integer | No | Desired number of tasks (1-1000) |
| LaunchType | String | No | Launch type (EC2, FARGATE, EXTERNAL) |
| CapacityProviderStrategy | List of CapacityProviderStrategyItem | No | Capacity provider strategy |
| DeploymentConfiguration | DeploymentConfiguration | No | Deployment configuration |
| SchedulingStrategy | String | No | REPLICA or DAEMON |
| PlacementConstraints | List of PlacementConstraint | No | Placement constraints |
| PlacementStrategies | List of PlacementStrategy | No | Placement strategies |
| NetworkConfiguration | NetworkConfiguration | No | Network configuration |
| LoadBalancers | List of LoadBalancer | No | Load balancers |
| ServiceRegistries | List of ServiceRegistry | No | Service discovery |
| PropagateTags | String | No | Propagate tags (TASK_DEFINITION, SERVICE) |
| EnableExecuteCommand | Boolean | No | Enable ECS Execute |
| HealthCheckGracePeriodSeconds | Integer | No | Grace period for health checks |
| Tags | List of Tag | No | Tags for the service |
| Property | Type | Description |
|---|---|---|
| MaximumPercent | Integer | Max tasks during deployment (100-200) |
| MinimumHealthyPercent | Integer | Min healthy tasks (0-100) |
| DeploymentCircuitBreaker | DeploymentCircuitBreaker | Circuit breaker config |
| Property | Type | Description |
|---|---|---|
| Enable | Boolean | Enable circuit breaker |
| Rollback | Boolean | Enable automatic rollback |
| Property | Type | Description |
|---|---|---|
| CapacityProvider | String | Capacity provider name |
| Weight | Integer | Weight for the provider |
| Base | Integer | Base tasks for the provider |
| Property | Type | Description |
|---|---|---|
| AwsvpcConfiguration | AwsVpcConfiguration | VPC configuration |
| Property | Type | Description |
|---|---|---|
| AssignPublicIp | String | ENABLED or DISABLED |
| SecurityGroups | List of String | Security group IDs |
| Subnets | List of String | Subnet IDs |
| Property | Type | Description |
|---|---|---|
| ContainerName | String | Name of the container |
| ContainerPort | Integer | Port on the container |
| TargetGroupArn | String | ARN of target group |
| Property | Type | Description |
|---|---|---|
| RegistryArn | String | ARN of service discovery |
| Port | Integer | Port number |
| ContainerName | String | Container name |
| ContainerPort | Integer | Container port |
| Property | Type | Description |
|---|---|---|
| Type | String | Constraint type (memberOf, distinctInstance) |
| Expression | String | Constraint expression |
| Property | Type | Description |
|---|---|---|
| Type | String | Strategy type (random, spread, binpack) |
| Field | String | Field for spread/binpack |
Resources:
EcsService:
Type: AWS::ECS::Service
Properties:
ServiceName: !Sub "${AWS::StackName}-service"
Cluster: !Ref ECSCluster
TaskDefinition: !Ref TaskDefinition
DesiredCount: 2
LaunchType: FARGATE
DeploymentConfiguration:
MaximumPercent: 200
MinimumHealthyPercent: 50
DeploymentCircuitBreaker:
Enable: true
Rollback: true
NetworkConfiguration:
AwsvpcConfiguration:
AssignPublicIp: DISABLED
SecurityGroups:
- !Ref EcsSecurityGroup
Subnets: !Ref PrivateSubnets
LoadBalancers:
- ContainerName: web
ContainerPort: 80
TargetGroupArn: !Ref TargetGroup
PropagateTags: SERVICE
ServiceRegistries:
- RegistryArn: !GetAtt ServiceDiscoveryService.Arn| Attribute | Description |
|---|---|
| ServiceArn | The ARN of the service |
| ServiceName | The name of the service |
| DesiredCount | The desired task count |
Creates a task set for an ECS service.
| Property | Type | Required | Description |
|---|---|---|---|
| Cluster | String | Yes | ARN of the cluster |
| Service | String | Yes | ARN of the service |
| TaskDefinition | String | Yes | ARN of the task definition |
| Scale | Scale | No | Scale configuration |
| TaskSetTags | List of Tag | No | Tags |
| Property | Type | Description |
|---|---|---|
| Unit | String | PERCENT |
| Value | Integer | Scale value (0-100) |
| Attribute | Description |
|---|---|
| TaskSetArn | The ARN of the task set |
Creates a capacity provider for ECS.
| Property | Type | Required | Description |
|---|---|---|---|
| Name | String | Yes | Name of the capacity provider |
| AutoScalingGroupProvider | AutoScalingGroupProvider | Yes | ASG configuration |
| Tags | List of Tag | No | Tags |
| Property | Type | Description |
|---|---|---|
| AutoScalingGroupArn | String | ARN of the ASG |
| ManagedScaling | ManagedScaling | Scaling settings |
| ManagedTerminationProtection | String | Termination protection |
| Property | Type | Description |
|---|---|---|
| Status | String | ENABLED or DISABLED |
| TargetCapacity | Integer | Target capacity |
| MinimumScalingStepSize | Integer | Min step |
| MaximumScalingStepSize | Integer | Max step |
| ScaleInInterval | Integer | Scale-in interval |
Resources:
CapacityProvider:
Type: AWS::ECS::CapacityProvider
Properties:
Name: !Sub "${AWS::StackName}-capacity-provider"
AutoScalingGroupProvider:
AutoScalingGroupArn: !Ref AutoScalingGroup
ManagedScaling:
Status: ENABLED
TargetCapacity: 80
MinimumScalingStepSize: 1
MaximumScalingStepSize: 10
ManagedTerminationProtection: DISABLEDCreates a scalable target for ECS service auto scaling.
| Property | Type | Required | Description |
|---|---|---|---|
| MaxCapacity | Integer | Yes | Maximum capacity |
| MinCapacity | Integer | Yes | Minimum capacity |
| ResourceId | String | Yes | Resource ID (service/cluster/service) |
| RoleARN | String | Yes | IAM role ARN |
| ScalableDimension | String | Yes | ecs:service:DesiredCount |
| ServiceNamespace | String | Yes | ecs |
Resources:
ScalableTarget:
Type: AWS::ApplicationAutoScaling::ScalableTarget
Properties:
MaxCapacity: 10
MinCapacity: 2
ResourceId: !Sub "service/${ClusterName}/${ServiceName}"
RoleARN: !Ref AutoScalingRoleArn
ScalableDimension: ecs:service:DesiredCount
ServiceNamespace: ecsCreates a scaling policy for ECS.
| Property | Type | Required | Description |
|---|---|---|---|
| PolicyName | String | Yes | Name of the policy |
| PolicyType | String | Yes | TargetTrackingScaling or StepScaling |
| ScalingTargetId | String | Yes | ID of scalable target |
| TargetTrackingScalingPolicyConfiguration | TargetTrackingScalingPolicyConfiguration | Cond | Target tracking config |
| StepScalingPolicyConfiguration | StepScalingPolicyConfiguration | Cond | Step scaling config |
| Property | Type | Description |
|---|---|---|
| PredefinedMetricSpecification | PredefinedMetricSpecification | Predefined metric |
| CustomizedMetricSpecification | CustomizedMetricSpecification | Custom metric |
| TargetValue | Double | Target value |
| ScaleInCooldown | Integer | Scale-in cooldown |
| ScaleOutCooldown | Integer | Scale-out cooldown |
| Property | Type | Description |
|---|---|---|
| PredefinedMetricType | String | ECSServiceAverageCPUUtilization, ECSServiceAverageMemoryUtilization |
| Property | Type | Description |
|---|---|---|
| AdjustmentType | String | ChangeInCapacity, PercentChangeInCapacity, ExactCapacity |
| Cooldown | Integer | Cooldown period |
| MetricAggregationType | String | Average, Maximum, Minimum |
| StepAdjustments | List of StepAdjustment | Step adjustments |
| Property | Type | Description |
|---|---|---|
| MetricIntervalLowerBound | Double | Lower bound |
| MetricIntervalUpperBound | Double | Upper bound |
| ScalingAdjustment | Integer | Adjustment amount |
Resources:
CpuScalingPolicy:
Type: AWS::ApplicationAutoScaling::ScalingPolicy
Properties:
PolicyName: !Sub "${AWS::StackName}-cpu-scaling"
PolicyType: TargetTrackingScaling
ScalingTargetId: !Ref ScalableTarget
TargetTrackingScalingPolicyConfiguration:
PredefinedMetricSpecification:
PredefinedMetricType: ECSServiceAverageCPUUtilization
TargetValue: 70
ScaleInCooldown: 300
ScaleOutCooldown: 60Creates a service discovery service.
| Property | Type | Required | Description |
|---|---|---|---|
| Name | String | Yes | Name of the service |
| NamespaceId | String | Yes | ARN of the namespace |
| DnsConfig | DnsConfig | Yes | DNS configuration |
| HealthCheckConfig | HealthCheckConfig | No | Health check config |
| HealthCheckCustomConfig | HealthCheckCustomConfig | No | Custom health check |
| Description | String | No | Description |
| Tags | List of Tag | No | Tags |
| Property | Type | Description |
|---|---|---|
| NamespaceId | String | Namespace ARN |
| RoutingPolicy | String | MULTIVALUE, LATENCY, GEODNS |
| DnsRecords | List of DnsRecord | DNS records |
| Property | Type | Description |
|---|---|---|
| Type | String | A, AAAA, SRV, CNAME |
| TTL | Integer | TTL in seconds |
Resources:
ServiceDiscoveryService:
Type: AWS::ServiceDiscovery::Service
Properties:
Name: web-app
NamespaceId: !Ref ServiceDiscoveryNamespace
DnsConfig:
DnsRecords:
- Type: A
TTL: 60
HealthCheckConfig:
Type: HTTP
ResourcePath: /health| Attribute | Description |
|---|---|
| Arn | The ARN of the service |
| Name | The name of the service |
Creates a private DNS namespace.
| Property | Type | Required | Description |
|---|---|---|---|
| Name | String | Yes | Name of the namespace |
| Vpc | String | Yes | VPC ID |
| Description | String | No | Description |
| Tags | List of Tag | No | Tags |
Resources:
ServiceDiscoveryNamespace:
Type: AWS::ServiceDiscovery::PrivateDnsNamespace
Properties:
Name: !Sub "${Environment}.internal"
Vpc: !Ref VpcId| Attribute | Description |
|---|---|
| Arn | The ARN of the namespace |
| Id | The ID of the namespace |
Creates a blue/green hook for ECS deployments.
| Property | Type | Required | Description |
|---|---|---|---|
| TrafficRoutingConfig | TrafficRoutingConfig | No | Traffic routing config |
| AdditionalOptions | AdditionalOptions | No | Additional options |
| LifecycleEventHooks | LifecycleEventHooks | No | Lifecycle hooks |
| ServiceRole | String | Yes | CodeDeploy service role |
| Applications | List of BlueGreenApplication | Yes | Target applications |
| Property | Type | Description |
|---|---|---|
| Type | String | AllAtOnce, TimeBasedCanary, TimeBasedLinear |
| TimeBasedCanary | TimeBasedCanary | Canary config |
| TimeBasedLinear | TimeBasedLinear | Linear config |
| Property | Type | Description |
|---|---|---|
| StepPercentage | Integer | Traffic percentage for first step (>=14) |
| BakeTimeMins | Integer | Minutes between steps |
| Property | Type | Description |
|---|---|---|
| StepPercentage | Integer | Traffic increment percentage |
| BakeTimeMins | Integer | Minutes between increments |
| Property | Type | Description |
|---|---|---|
| TerminationWaitTimeInMinutes | Integer | Wait time before termination |
| Property | Type | Description |
|---|---|---|
| BeforeInstall | String | Lambda function for BeforeInstall |
| AfterInstall | String | Lambda function for AfterInstall |
| AfterAllowTestTraffic | String | Lambda function for AfterAllowTestTraffic |
| BeforeAllowTraffic | String | Lambda function for BeforeAllowTraffic |
| AfterAllowTraffic | String | Lambda function for AfterAllowTraffic |
| Property | Type | Description |
|---|---|---|
| Target | BlueGreenTarget | Target service |
| ECSAttributes | ECSAttributes | ECS-specific config |
| Property | Type | Description |
|---|---|---|
| Type | String | AWS::ECS::Service |
| LogicalID | String | Logical ID of the service |
| Property | Type | Description |
|---|---|---|
| TaskDefinitions | List of String | Task definition logical IDs |
| TaskSets | List of String | Task set logical IDs |
| TrafficRouting | TrafficRouting | Traffic routing config |
| Property | Type | Description |
|---|---|---|
| ProdTrafficRoute | TrafficRoute | Production listener |
| TestTrafficRoute | TrafficRoute | Test listener |
| TargetGroups | List of String | Target group logical IDs |
| Property | Type | Description |
|---|---|---|
| Type | String | AWS::ElasticLoadBalancingV2::Listener |
| LogicalID | String | Logical ID of the listener |
Hooks:
BlueGreenHook:
Type: AWS::CodeDeploy::BlueGreen
Properties:
TrafficRoutingConfig:
Type: TimeBasedCanary
TimeBasedCanary:
StepPercentage: 15
BakeTimeMins: 5
AdditionalOptions:
TerminationWaitTimeInMinutes: 5
ServiceRole: !Ref CodeDeployRoleArn
Applications:
- Target:
Type: AWS::ECS::Service
LogicalID: EcsService
ECSAttributes:
TaskDefinitions:
- TaskDefinitionBlue
- TaskDefinitionGreen
TaskSets:
- TaskSetBlue
- TaskSetGreen
TrafficRouting:
ProdTrafficRoute:
Type: AWS::ElasticLoadBalancingV2::Listener
LogicalID: ProductionListener
TestTrafficRoute:
Type: AWS::ElasticLoadBalancingV2::Listener
LogicalID: TestListener
TargetGroups:
- BlueTargetGroup
- GreenTargetGroupCreates a target group for ALB.
| Property | Type | Required | Description |
|---|---|---|---|
| Name | String | No | Name of the target group |
| Port | Integer | Yes | Port on the targets |
| Protocol | String | Yes | Protocol (HTTP, HTTPS, TCP, TLS) |
| VpcId | String | Yes | VPC ID |
| HealthCheckPath | String | No | Health check path |
| HealthCheckProtocol | String | No | Health check protocol |
| HealthCheckPort | String | No | Health check port |
| HealthCheckIntervalSeconds | Integer | No | Interval (5-300) |
| HealthCheckTimeoutSeconds | Integer | No | Timeout (2-60) |
| HealthyThresholdCount | Integer | No | Healthy threshold (2-10) |
| UnhealthyThresholdCount | Integer | No | Unhealthy threshold (2-10) |
| Matcher | Matcher | No | Success codes |
| TargetType | String | No | instance, ip, lambda |
| IpAddressType | String | No | ipv4, ipv6 |
| Tags | List of Tag | No | Tags |
| Property | Type | Description |
|---|---|---|
| HttpCode | String | HTTP status code(s) |
| GrpcCode | String | gRPC status code(s) |
Resources:
BlueTargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
Name: !Sub "${AWS::StackName}-blue-tg"
Port: 80
Protocol: HTTP
VpcId: !Ref VpcId
HealthCheckPath: /health
HealthCheckIntervalSeconds: 30
HealthCheckTimeoutSeconds: 5
HealthyThresholdCount: 2
UnhealthyThresholdCount: 3
Matcher:
HttpCode: 200-499
TargetType: ip| Attribute | Description |
|---|---|
| TargetGroupArn | The ARN of the target group |
| TargetGroupName | The name of the target group |
Creates a listener for ALB.
| Property | Type | Required | Description |
|---|---|---|---|
| DefaultActions | List of Action | Yes | Default actions |
| LoadBalancerArn | String | Yes | ARN of the load balancer |
| Port | Integer | Yes | Port (1-65535) |
| Protocol | String | Yes | Protocol (HTTP, HTTPS, TCP, TLS) |
| Certificates | List of Certificate | No | Certificates |
| SslPolicy | String | No | SSL policy (HTTPS/TLS only) |
| Property | Type | Description |
|---|---|---|
| Type | String | forward, redirect, authenticate-oidc, authenticate-cognito, fixed-response |
| TargetGroupArn | String | Target group ARN |
| ForwardConfig | ForwardConfig | Forward config |
| RedirectConfig | RedirectConfig | Redirect config |
Resources:
ProductionListener:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
DefaultActions:
- Type: forward
ForwardConfig:
TargetGroupStickinessConfig:
Enabled: true
DurationSeconds: 3600
TargetGroups:
- TargetGroupArn: !Ref BlueTargetGroup
Weight: 100
LoadBalancerArn: !Ref ApplicationLoadBalancer
Port: 80
Protocol: HTTPReturns the value of the specified parameter or resource.
# Reference a parameter
ClusterName: !Ref ClusterNameParam
# Reference a resource (returns the physical ID)
ClusterArn: !Ref ECSClusterReturns the value of an attribute from an ECS resource.
# Get the cluster ARN
ClusterArn: !GetAtt ECSCluster.Arn
# Get service ARN
ServiceArn: !GetAtt EcsService.Arn
# Get task definition ARN
TaskDefinitionArn: !Ref TaskDefinitionSubstitutes variables in an input string.
# With variable substitution
ClusterName: !Sub "${AWS::StackName}-cluster"
# With multiple variables
RoleArn: !Sub "arn:aws:iam::${AWS::AccountId}:role/${RoleName}"Imports values exported by other stacks.
# Import from another stack
ClusterArn: !ImportValue
!Sub "${NetworkStackName}-ClusterArn"Returns the value from a mapping.
# Find in mapping
MemorySize: !FindInMap [EnvironmentConfig, !Ref Environment, Memory]Returns one value if condition is true, another if false.
# Conditional resource
DesiredCount: !If [IsProduction, 10, 2]Policies:
- AmazonECSTaskExecutionRolePolicyPolicies:
- PolicyName: EcrPullPolicy
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- ecr:GetDownloadUrlForLayer
- ecr:BatchGetImage
- ecr:BatchCheckLayerAvailability
Resource: !Ref EcrRepositoryArnPolicies:
- PolicyName: SecretsPolicy
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- secretsmanager:GetSecretValue
Resource: !Ref SecretArnPolicies:
- PolicyName: CloudWatchLogsPolicy
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- logs:CreateLogStream
- logs:PutLogEvents
Resource: !GetAtt LogGroup.Arn| CPU Units | Memory Options (MiB) |
|---|---|
| 128 | 4-1024 |
| 256 | 4-2048 |
| 512 | 4-4096 |
| 1024 | 8-8192 |
| 2048 | 16-16384 |
| 4096 | 32-30720 |
| CPU (vCPU) | Memory (GiB) |
|---|---|
| 0.25 | 0.5, 1, 2 |
| 0.5 | 1, 2, 3, 4 |
| 1 | 2, 3, 4, 5, 6, 7, 8 |
| 2 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 |
| 4 | 8-30 |
| 8 | 16-60 |
| Container Size | Memory Hard Limit | Memory Soft Limit |
|---|---|---|
| Small | 512 MiB | 256 MiB |
| Medium | 1024 MiB | 512 MiB |
| Large | 2048 MiB | 1024 MiB |
| X-Large | 4096 MiB | 2048 MiB |
Resources:
EcsService:
Type: AWS::ECS::Service
Properties:
Tags:
- Key: Environment
Value: !Ref Environment
- Key: Project
Value: !Ref ProjectName
- Key: Owner
Value: team@example.com
- Key: ManagedBy
Value: CloudFormation
- Key: CostCenter
Value: "12345"
- Key: Version
Value: "1.0.0"| Resource | Default Limit |
|---|---|
| Clusters per account | 1000 |
| Services per cluster | 500 |
| Tasks per service (EC2) | 1000 |
| Tasks per service (Fargate) | 200 |
| Container instances per cluster | 1000 |
| Container definitions per task | 10 |
| Volumes per task | 5 |
| Port mappings per container | 100 |
| Resource | Default Limit |
|---|---|
| Tasks per launch | 10 |
| CPU (vCPU) | 0.25-16 |
| Memory (GiB) | 0.5-120 |
| Ephemeral storage (GB) | 20-200 |
| Metric | Limit |
|---|---|
| Dimensions per metric | 30 |
| Alarm actions | 5 |
| Metric data points | 150000 |
HealthCheck:
Command:
- CMD-SHELL
- curl -f http://localhost:8080/health || exit 1
Interval: 30
Timeout: 5
Retries: 3
StartPeriod: 60HealthCheck:
Command:
- CMD-SHELL
- wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1HealthCheck:
Command:
- CMD-SHELL
- nc -z localhost 8080 || exit 1StartPeriod to allow container initializationInterval reasonable (15-30 seconds)Timeout shorter than intervalRetries appropriately (2-3)plugins
developer-kit-ai
skills
chunking-strategy
prompt-engineering
developer-kit-aws
skills
aws
aws-cli-beast
aws-cost-optimization
aws-drawio-architecture-diagrams
aws-sam-bootstrap
aws-cloudformation
aws-cloudformation-auto-scaling
references
aws-cloudformation-bedrock
references
aws-cloudformation-cloudfront
references
aws-cloudformation-cloudwatch
references
aws-cloudformation-dynamodb
references
aws-cloudformation-ec2
aws-cloudformation-ecs
references
aws-cloudformation-elasticache
aws-cloudformation-iam
references
aws-cloudformation-lambda
references
aws-cloudformation-rds
aws-cloudformation-s3
references
aws-cloudformation-security
references
aws-cloudformation-task-ecs-deploy-gh
aws-cloudformation-vpc
developer-kit-core
skills
developer-kit-java
skills
aws-lambda-java-integration
aws-rds-spring-boot-integration
aws-sdk-java-v2-bedrock
aws-sdk-java-v2-core
aws-sdk-java-v2-dynamodb
aws-sdk-java-v2-kms
aws-sdk-java-v2-lambda
aws-sdk-java-v2-messaging
aws-sdk-java-v2-rds
aws-sdk-java-v2-s3
aws-sdk-java-v2-secrets-manager
graalvm-native-image
langchain4j
langchain4j-mcp-server-patterns
langchain4j-ai-services-patterns
references
langchain4j-mcp-server-patterns
references
langchain4j-rag-implementation-patterns
references
langchain4j-spring-boot-integration
langchain4j-testing-strategies
langchain4j-tool-function-calling-patterns
langchain4j-vector-stores-configuration
references
qdrant
references
spring-ai-mcp-server-patterns
references
spring-boot-actuator
spring-boot-cache
spring-boot-crud-patterns
spring-boot-dependency-injection
spring-boot-event-driven-patterns
spring-boot-openapi-documentation
spring-boot-project-creator
spring-boot-resilience4j
spring-boot-rest-api-standards
spring-boot-saga-pattern
spring-boot-security-jwt
assets
references
scripts
spring-boot-test-patterns
spring-data-jpa
references
spring-data-neo4j
references
unit-test-application-events
unit-test-bean-validation
unit-test-boundary-conditions
unit-test-caching
unit-test-config-properties
unit-test-controller-layer
unit-test-exception-handler
unit-test-json-serialization
unit-test-mapper-converter
unit-test-parameterized
unit-test-scheduled-async
unit-test-service-layer
unit-test-utility-methods
unit-test-wiremock-rest-api
developer-kit-php
skills
aws-lambda-php-integration
developer-kit-python
skills
aws-lambda-python-integration
developer-kit-tools
developer-kit-typescript
skills
aws-lambda-typescript-integration
better-auth
drizzle-orm-patterns
dynamodb-toolbox-patterns
references
nestjs
nestjs-best-practices
nestjs-code-review
nestjs-drizzle-crud-generator
scripts
nextjs-app-router
nextjs-authentication
nextjs-code-review
nextjs-data-fetching
references
nextjs-deployment
nextjs-performance
nx-monorepo
react-code-review
react-patterns
references
shadcn-ui
tailwind-css-patterns
references
tailwind-design-system
references
turborepo-monorepo
typescript-docs
typescript-security-review
zod-validation-utilities