launching-ec2-instance-with-best-practices

Launches EC2 instances with hardened security groups, least-privilege IAM roles, and encrypted EBS volumes.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill launching-ec2-instance-with-best-practices-sakicodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: launching-ec2-instance-with-best-practices
Source: https://github.com/sakicodes/BuildFestHackathon26/tree/main/.agents/skills/launching-ec2-instance-with-best-practices
Command: npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill launching-ec2-instance-with-best-practices-sakicodes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Launching EC2 instances manually often leads to insecure defaults like open SSH ports, missing IAM roles, unencrypted storage, and untagged resources that inflate costs and create audit gaps. This Skill guides the full launch workflow with secure, cost-efficient defaults. ## Core Features & Use Cases - Guided Launch Procedure: Walks through AMI selection, instance sizing, network validation, IAM role creation, security group hardening, storage configuration, and tagging with user confirmation at each stage. - Security-First Defaults: Enforces IMDSv2, encrypted gp3 volumes, least-privilege IAM policies, and SSM Session Manager access instead of open SSH when no source CIDR is provided. - Use Case: A developer needs a staging application server with S3 access. The Skill recommends a t3.small in a private subnet, creates a scoped IAM role, restricts ingress to the VPC CIDR, and applies cost-tracking tags before launch. ## Quick Start Ask the assistant to launch a new EC2 instance for your workload type and region using AWS best practices.

Frequently Asked Questions about launching-ec2-instance-with-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I launch an EC2 instance with AWS best practices?

Provide the workload type and region, then confirm the proposed defaults for AMI, instance type, subnet, IAM role, security group, storage, and tags. The procedure validates each choice and asks for explicit confirmation before running aws ec2 run-instances.

What instance type should I choose for my EC2 workload?

The procedure recommends burstable t3 or t3a types by default: t3.micro for development and low-traffic web, t3.small for web servers, and t3.medium for application servers or databases. ARM-based t4g instances are suggested when the AMI supports arm64 for better price-performance.

Can I launch an EC2 instance without opening SSH port 22?

Yes. If no allow_ssh_from CIDR is provided and the workload is not a bastion host, the procedure skips SSH ingress entirely and uses AWS Systems Manager Session Manager instead, attaching the AmazonSSMManagedInstanceCore policy to the instance IAM role.

Why does my EC2 instance terminate immediately after launch?

Immediate termination usually means the EBS volume is too small or the AMI is incompatible with the instance type architecture. Check the console output with aws ec2 get-console-output and verify the AMI architecture matches the selected instance family.

Does the procedure encrypt EBS volumes by default?

Yes. Root volumes use encrypted gp3 storage with the default AWS-managed KMS key unless a custom key is specified. Delete-on-termination is set based on environment: disabled for production, enabled for staging, development, and testing.