Provides AWS CloudFormation patterns for Auto Scaling including EC2, ECS, and Lambda. Use when creating Auto Scaling groups, launch configurations, launch templates, scaling policies, lifecycle hooks, and predictive scaling. Covers template structure with Parameters, Outputs, Mappings, Conditions, cross-stack references, and best practices for high availability and cost optimization.
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill aws-cloudformation-auto-scaling
Create production-ready Auto Scaling infrastructure using AWS CloudFormation templates. This skill covers Auto Scaling Groups for EC2, ECS, and Lambda, launch configurations, launch templates, scaling policies, lifecycle hooks, and best practices for high availability and cost optimization.
Use this skill when:
Follow these steps to create Auto Scaling infrastructure with CloudFormation:
Specify capacity and instance settings with AWS-specific parameter types:
Parameters:
MinSize:
Type: Number
Default: 2
Description: Minimum number of instances
MaxSize:
Type: Number
Default: 10
Description: Maximum number of instances
DesiredCapacity:
Type: Number
Default: 2
Description: Desired number of instances
InstanceType:
Type: AWS::EC2::Instance::Type
Default: t3.micro
Description: EC2 instance type
AmiId:
Type: AWS::EC2::Image::Id
Description: AMI ID for instances
SubnetIds:
Type: List<AWS::EC2::Subnet::Id>
Description: Subnets for Auto Scaling group
Define instance launch settings:
Resources:
MyLaunchConfiguration:
Type: AWS::AutoScaling::LaunchConfiguration
Properties:
LaunchConfigurationName: !Sub "${AWS::StackName}-lc"
ImageId: !Ref AmiId
InstanceType: !Ref InstanceType
KeyName: !Ref KeyName
SecurityGroups:
- !Ref InstanceSecurityGroup
InstanceMonitoring: Enabled
UserData:
Fn::Base64: |
#!/bin/bash
yum update -y
yum install -y httpd
systemctl start httpd
Specify min/max/desired capacity and networking:
Resources:
MyAutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
AutoScalingGroupName: !Sub "${AWS::StackName}-asg"
MinSize: !Ref MinSize
MaxSize: !Ref MaxSize
DesiredCapacity: !Ref DesiredCapacity
VPCZoneIdentifier: !Ref SubnetIds
LaunchConfigurationName: !Ref MyLaunchConfiguration
TargetGroupARNs:
- !Ref MyTargetGroup
HealthCheckType: ELB
HealthCheckGracePeriod: 300
Tags:
- Key: Environment
Value: !Ref Environment
PropagateAtLaunch: true
Set up ALB for traffic distribution:
Resources:
MyTargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
Name: !Sub "${AWS::StackName}-tg"
Port: 80
Protocol: HTTP
VpcId: !Ref VPCId
HealthCheckPath: /
TargetType: instance
MyLoadBalancer:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
Name: !Sub "${AWS::StackName}-alb"
Scheme: internet-facing
Type: application
Subnets:
- !Ref PublicSubnet1
- !Ref PublicSubnet2
Implement target tracking scaling:
Resources:
TargetTrackingPolicy:
Type: AWS::AutoScaling::ScalingPolicy
Properties:
PolicyName: !Sub "${AWS::StackName}-target-tracking"
PolicyType: TargetTrackingScaling
AutoScalingGroupName: !Ref MyAutoScalingGroup
TargetTrackingConfiguration:
PredefinedMetricSpecification:
PredefinedMetricType: ASGAverageCPUUtilization
TargetValue: 70
DisableScaleIn: false
Implement hooks for graceful instance management:
Resources:
LifecycleHookTermination:
Type: AWS::AutoScaling::LifecycleHook
Properties:
LifecycleHookName: !Sub "${AWS::StackName}-termination-hook"
AutoScalingGroupName: !Ref MyAutoScalingGroup
LifecycleTransition: autoscaling:EC2_INSTANCE_TERMINATING
HeartbeatTimeout: 300
NotificationTargetARN: !Ref SNSTopic
RoleARN: !Ref LifecycleHookRole
Configure CloudWatch alarms for scaling triggers:
Resources:
HighCpuAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmName: !Sub "${AWS::StackName}-high-cpu"
MetricName: CPUUtilization
Namespace: AWS/EC2
Dimensions:
- Name: AutoScalingGroupName
Value: !Ref MyAutoScalingGroup
Statistic: Average
Period: 60
EvaluationPeriods: 3
Threshold: 70
ComparisonOperator: GreaterThanThreshold
Export ASG configuration for other stacks:
Outputs:
AutoScalingGroupName:
Description: Name of the Auto Scaling Group
Value: !Ref MyAutoScalingGroup
Export:
Name: !Sub "${AWS::StackName}-AutoScalingGroupName"
AutoScalingGroupArn:
Description: ARN of the Auto Scaling Group
Value: !GetAtt MyAutoScalingGroup.AutoScalingGroupArn
Export:
Name: !Sub "${AWS::StackName}-AutoScalingGroupArn"
Full end-to-end template with VPC, ASG, ALB, and scaling policies:
AWSTemplateFormatVersion: '2010-09-09'
Description: Auto Scaling Group with ALB integration
Parameters:
Environment:
Type: String
Default: production
InstanceType:
Type: AWS::EC2::Instance::Type
Default: t3.micro
AmiId:
Type: AWS::EC2::Image::Id
VpcId:
Type: AWS::EC2::VPC::Id
SubnetIds:
Type: List<AWS::EC2::Subnet::Id>
Resources:
InstanceSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Security group for ASG instances
VpcId: !Ref VpcId
SecurityGroupEgress:
- CidrIp: 0.0.0.0/0
IpProtocol: "-1"
TargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
Name: !Sub "${AWS::StackName}-tg"
Port: 80
Protocol: HTTP
VpcId: !Ref VpcId
HealthCheckPath: /health
TargetType: instance
LaunchTemplate:
Type: AWS::EC2::LaunchTemplate
Properties:
LaunchTemplateName: !Sub "${AWS::StackName}-lt"
ImageId: !Ref AmiId
InstanceType: !Ref InstanceType
SecurityGroupIds:
- !Ref InstanceSecurityGroup
AutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
AutoScalingGroupName: !Sub "${AWS::StackName}-asg"
MinSize: 2
MaxSize: 10
DesiredCapacity: 4
LaunchTemplate:
LaunchTemplateId: !Ref LaunchTemplate
Version: !GetAtt LaunchTemplate.LatestVersionNumber
VPCZoneIdentifier: !Ref SubnetIds
TargetGroupARNs:
- !Ref TargetGroup
HealthCheckType: ELB
HealthCheckGracePeriod: 300
Tags:
- Key: Name
Value: !Sub "${AWS::StackName}-instance"
PropagateAtLaunch: true
ScalingPolicy:
Type: AWS::AutoScaling::ScalingPolicy
Properties:
PolicyName: !Sub "${AWS::StackName}-cpu-policy"
PolicyType: TargetTrackingScaling
AutoScalingGroupName: !Ref AutoScalingGroup
TargetTrackingConfiguration:
PredefinedMetricSpecification:
PredefinedMetricType: ASGAverageCPUUtilization
TargetValue: 70
Outputs:
AutoScalingGroupName:
Value: !Ref AutoScalingGroup
Export:
Name: !Sub "${AWS::StackName}-ASG-Name"
Validate template and test changes before deployment:
# Validate CloudFormation template
aws cloudformation validate-template --template-body file://template.yaml
# Create change set to preview changes
aws cloudformation create-change-set \
--stack-name my-asg-stack \
--template-body file://template.yaml \
--change-set-type CREATE
# Describe change set
aws cloudformation describe-change-set \
--stack-name my-asg-stack \
--change-set-name <change-set-id>
# Execute change set
aws cloudformation execute-change-set \
--stack-name my-asg-stack \
--change-set-name <change-set-id>
Verify ASG health and configuration after deployment:
# Describe Auto Scaling Groups
aws autoscaling describe-auto-scaling-groups \
--auto-scaling-group-names my-asg-stack-asg
# Check instance health
aws autoscaling describe-auto-scaling-instances \
--instance-ids <instance-id>
# Verify scaling policies
aws autoscaling describe-policies \
--auto-scaling-group-name my-asg-stack-asg
# Review scaling activities
aws autoscaling describe-scaling-activities \
--auto-scaling-group-name my-asg-stack-asg
UpdatePolicy for graceful updates and instance refreshHealthCheckGracePeriod >= expected instance initialization timeInstanceMaintenancePolicy to avoid unexpected terminationsaws-autoscaling.amazonaws.com)For detailed implementation guidance, see:
Assess Kubernetes workloads and cluster configuration for AKS Automatic compatibility. Identifies incompatibilities, generates fixes, and guides migration from AKS Standard to AKS Automatic. WHEN: migrate to AKS Automatic, check AKS Automatic readiness, validate manifests for Automatic, assess cluster for Automatic compatibility, fix deployment for Automatic compatibility, identify AKS Automatic migration blockers, is my cluster ready for AKS Automatic.
Discovers available Azure OpenAI model capacity across regions and projects. Analyzes quota limits, compares availability, and recommends optimal deployment locations based on capacity requirements. USE FOR: find capacity, check quota, where can I deploy, capacity discovery, best region for capacity, multi-project capacity search, quota analysis, model availability, region comparison, check TPM availability. DO NOT USE FOR: actual deployment (hand off to preset or customize after discovery), quota increase requests (direct user to Azure Portal), listing existing deployments.
Interactive guided deployment flow for Azure OpenAI models with full customization control. Step-by-step selection of model version, SKU (GlobalStandard/Standard/ProvisionedManaged), capacity, RAI policy (content filter), and advanced options (dynamic quota, priority processing, spillover). USE FOR: custom deployment, customize model deployment, choose version, select SKU, set capacity, configure content filter, RAI policy, deployment options, detailed deployment, advanced deployment, PTU deployment, provisioned throughput. DO NOT USE FOR: quick deployment to optimal region (use preset).
Unified Azure OpenAI model deployment skill with intelligent intent-based routing. Handles quick preset deployments, fully customized deployments (version/SKU/capacity/RAI policy), and capacity discovery across regions and projects. USE FOR: deploy model, deploy gpt, create deployment, model deployment, deploy openai model, set up model, provision model, find capacity, check model availability, where can I deploy, best region for model, capacity analysis. DO NOT USE FOR: listing existing deployments (use foundry_models_deployments_list MCP tool), deleting deployments, agent creation (use agent/create), project creation (use project/create).
Intelligently deploys Azure OpenAI models to optimal regions by analyzing capacity across all available regions. Automatically checks current region first and shows alternatives if needed. USE FOR: quick deployment, optimal region, best region, automatic region selection, fast setup, multi-region capacity check, high availability deployment, deploy to best location. DO NOT USE FOR: custom SKU selection (use customize), specific version selection (use customize), custom capacity configuration (use customize), PTU deployments (use customize).
This skill should be used when working with LaminDB, an open-source data framework for biology that makes data queryable, traceable, reproducible, and FAIR. Use when managing biological datasets (scRNA-seq, spatial, flow cytometry, etc.), tracking computational workflows, curating and validating data with biological ontologies, building data lakehouses, or ensuring data lineage and reproducibility in biological research. Covers data management, annotation, ontologies (genes, cell types, diseases, tissues), schema validation, integrations with workflow managers (Nextflow, Snakemake) and MLOps platforms (W&B, MLflow), and deployment strategies.
Latch platform for bioinformatics workflows. Build pipelines with Latch SDK, @workflow/@task decorators, deploy serverless workflows, LatchFile/LatchDir, Nextflow/Snakemake integration.
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.
Take giuseppe-trisciuoglio/aws-cloudformation-auto-scaling from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.