launching-ec2-instance-with-best-practices

bởi aws

Khởi chạy một phiên bản EC2 với các thiết lập mặc định an toàn, tiết kiệm chi phí bao gồm lựa chọn AMI, định cỡ phiên bản burstable, vai trò IAM đặc quyền tối thiểu, bảo mật tăng cường…

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill launching-ec2-instance-with-best-practices

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.

Thêm skills từ aws

analyzing-release-readiness
aws
Kích hoạt đánh giá mức độ sẵn sàng phát hành trước khi merge trên GitHub PR, GitLab MR hoặc nhánh cục bộ. Sử dụng khi người dùng muốn phân tích các thay đổi mã nguồn để đánh giá rủi ro, tính đúng đắn,…
scanning-with-aws-security-agent
aws
Chạy quét AWS Security Agent trên không gian làm việc — tải mã nguồn lên AWS, quét bằng dịch vụ Security Agent được quản lý, và trả về kết quả được xếp hạng, đã xác minh…
coordinating-multi-space-devops-agent
aws
Điều phối AWS DevOps Agent trên nhiều AgentSpaces từ một phiên Claude Code — định tuyến câu hỏi đến đúng không gian (prod vs staging vs knowledge),…
aws-security
aws
Bao gồm các dịch vụ và quy trình bảo mật AWS — phát hiện Security Hub V2 (OCSF), bộ kết nối, bộ tổng hợp, quy tắc tự động hóa và tóm tắt trạng thái bảo mật;…
querying-aws-sagemaker-catalog
aws
Chạy phân tích SQL trên các bảng metadata của SageMaker Catalog được xuất dưới dạng Apache Iceberg trong S3 Tables. Bao gồm các truy vấn quản trị, theo dõi tăng trưởng tài sản,…
agents-connect
aws
Sử dụng khi kết nối agent của bạn với API, công cụ hoặc dịch vụ bên ngoài qua Gateway, hoặc hạn chế quyền truy cập công cụ bằng chính sách Cedar. Xử lý thiết lập gateway, mục tiêu…
aurora-dsql
aws
Cung cấp và quản lý các cụm Aurora DSQL, kết nối qua psql hoặc DSQL Connectors, quản lý schema, chạy truy vấn, di chuyển từ MySQL, chẩn đoán query plan,…
transitgateway
aws
Cấu hình AWS Transit Gateway: tạo một hub trung tâm và đính kèm các VPC, phân đoạn lưu lượng bằng các bảng định tuyến, tập trung hóa lưu lượng ra và kiểm tra thông qua hub…