Ninja Docs Help

Best Practices

Revision

Date

Description

1.0

26.08.2024

Init document

  • Right Sizing: Select the appropriate instance type and size for your application needs. EC2 offers a variety of instance types optimized for different use cases based on memory, CPU, and storage capacity.

  • Security: Use AWS Identity and Access Management (IAM) to control access to your EC2 resources. Regularly patch and update your instances. Make use of Security Groups and Network Access Control Lists (NACLs) to control inbound and outbound traffic to your instances.

  • EBS Optimized Instances: If your applications require high-speed storage, consider using EBS optimized instances that provide low-latency, high throughput connections to EBS volumes.

  • Auto Scaling: Implement auto-scaling to manage the number of instances that are running, based on predefined conditions or schedules.

  • Backups and Disaster Recovery: Regularly create snapshots of your Amazon EBS volumes to ensure you have backups available when you need them. Also consider setting up instances in multiple regions or Availability Zones for high availability and disaster recovery.

  • Monitoring: Use Amazon CloudWatch to monitor your instances and EBS volumes. Set up alerts for predefined thresholds to stay on top of any potential issues.

  • Cost Optimization: Use a combination of On-Demand, Reserved, and Spot instances to optimize costs. Reserved instances can be used for baseline load, OnDemand for variable load, and Spot Instances for batch or time-flexible jobs.

  • Use Elastic IP Addresses Carefully: While one Elastic IP address is free for each running instance, AWS charges for additional Elastic IP addresses or any unattached Elastic IP addresses. So, manage your Elastic IPs effectively.

  • Manage EBS Volumes: Clean up unused EBS volumes, and snapshots as you will get charged for them.

  • Use Placement Groups: For applications that require low network latency, high network throughput, or both, use placement groups to influence the placement of a group of interdependent instances to meet the needs of your workload.

Last modified: 17 February 2025