PluginBench
Skill
Official
Pass
Audit score 90

launching-ec2-instance-with-best-practices

aws/agent-toolkit-for-aws

Launch EC2 instances with secure, cost-efficient defaults including IAM roles, encrypted storage, and hardened security groups.

What is launching-ec2-instance-with-best-practices?

This skill automates EC2 instance deployment following AWS best practices for security and cost optimization. Use it when you need to provision new EC2 instances with sensible defaults for AMI selection, instance sizing, network configuration, and tagging.

  • Selects appropriate AMIs with architecture compatibility checks
  • Recommends burstable instance types optimized for cost
  • Creates least-privilege IAM roles for required AWS service access
  • Configures hardened security groups with minimal port exposure
  • Provisions encrypted gp3 EBS volumes with environment-appropriate retention
  • Applies comprehensive tagging for cost tracking and organization

How to install launching-ec2-instance-with-best-practices

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill launching-ec2-instance-with-best-practices
Prerequisites
  • AWS account with appropriate IAM permissions to create EC2 instances, IAM roles, and security groups
  • AWS CLI configured with valid credentials
  • VPC and subnet already created or identified for instance placement
Claude Code
Cursor
Windsurf
Cline

How to use launching-ec2-instance-with-best-practices

  1. 1.Specify your workload type and environment (development, staging, production)
  2. 2.Provide network configuration details (VPC, subnet, public/private placement preference)
  3. 3.Indicate required AWS service access needs for IAM role creation
  4. 4.Review and confirm the recommended instance type, AMI, and security group rules
  5. 5.Execute the launch procedure which creates all resources with best-practice defaults
  6. 6.Verify instance connectivity using the provided connection instructions or AWS Systems Manager Session Manager

Use cases

Good for
  • Deploying new application servers with security and cost controls
  • Launching development or staging environments with consistent configuration
  • Provisioning instances for workloads requiring encrypted storage and IAM access
  • Setting up instances with proper tagging for billing and resource organization
  • Automating EC2 deployment while maintaining AWS security best practices
Who it's for
  • DevOps engineers
  • Cloud infrastructure teams
  • AWS solution architects
  • Development teams deploying to AWS

launching-ec2-instance-with-best-practices FAQ

What instance types does this skill recommend?

The skill recommends burstable instance types (t3, t3a, t4g) optimized for cost-efficiency by default, with options to select different types based on workload requirements.

Can I customize the security group rules?

Yes, the skill creates hardened security groups with minimal port exposure by default, but you can specify additional ports or sources needed for your application.

What happens if instance capacity is insufficient?

The skill provides troubleshooting guidance to try different availability zones or alternative instance types (e.g., t3a instead of t3).

How is the EBS volume encrypted?

The skill provisions gp3 volumes with encryption enabled by default, with retention policies appropriate to your specified environment.

What if I cannot connect via SSH after launch?

Verify the security group allows SSH from your IP, key file has 400 permissions, and the instance is running. Alternatively, use AWS Systems Manager Session Manager for connection.

Full instructions (SKILL.md)

Source of truth, from aws/agent-toolkit-for-aws.


name: launching-ec2-instance-with-best-practices description: Launches an EC2 instance with secure, cost-efficient defaults including AMI selection, burstable instance sizing, least-privilege IAM roles, hardened security groups, encrypted EBS volumes, and comprehensive tagging. Use when deploying new EC2 instances following AWS best practices for security and cost optimization. version: 1

Launching EC2 Instances with Best Practices

Overview

Domain expertise for launching EC2 instances with sensible defaults optimized for security, cost-efficiency, and operational best practices. Covers AMI selection, instance type recommendation, network configuration, IAM role creation, security group hardening, storage configuration, tagging strategy, and post-launch verification.

Launch an EC2 instance

To launch a fully configured EC2 instance with best-practice defaults, follow the procedure exactly. See EC2 instance launch procedure.

The procedure handles:

  • Intelligent defaults based on workload type and environment
  • Network validation (VPC, subnet, public/private placement)
  • AMI selection with architecture compatibility checks
  • Least-privilege IAM roles for required AWS service access
  • Hardened security groups with minimal port exposure
  • Encrypted gp3 storage with environment-appropriate retention
  • Comprehensive tagging for cost tracking and organization
  • Post-launch verification and connection instructions

Troubleshooting

Insufficient instance capacity

Try a different availability zone or instance type (e.g., t3a instead of t3). See the full troubleshooting guide in the launch procedure.

Instance immediately terminates

Check console output with aws ec2 get-console-output. Verify EBS volume size is sufficient and AMI is compatible with the instance type.

Cannot connect via SSH

Verify the security group allows SSH from your IP, key file permissions are 400, and the instance is running. Consider AWS Systems Manager Session Manager as an alternative.