Note: You can’t delete a snapshot that is managed by the AWS Backup service using Amazon EC2. Snapshots generated costs, we should first, delete the unused/old snapshots, for example, listing the old ones, > aws ec2 describe-snapshots -query "Snapshots[?(StartTime aws ec2 delete-snapshot -snapshot-id snap-1234567890abcdef0 Archive dated and Deleting unnecessary Snapshots The good news about both is that we could select No-Upfront payment, only we need to commit to using saving plans or RIs for 1 year or 3, and we could get the discount. Savings Plans apply to compute instances regardless of size, Auto Scaling Group, Availability Zone, or region,ĪWS doesn’t have Savings plans for RDS, but we could get Reserved Instances instead. For example, a one-year Savings Plan with no upfront payment plan grants a discount of up to 54%. ![]() The Savings Plan is a flexible pricing model that lets users use EC2, Lambda, and Fargate at a lower cost, by committing to a continuous usage, measured in terms of USD per hour, for a period of 1 or 3 years. Use Saving plans for EC2/Lambdas/Fargate and RI for RDS You can adjust the retention policy for each log group, keeping the indefinite retention or choosing a retention period between 10 years and one day. Lastly, CloudWatch Logs, by default, logs are kept indefinitely and never expire. When enabled, lifecycle management migrates files that have not been accessed for a set period of time to the EFS Standard–Infrequent Access (Standard-IA) or One Zone–Infrequent Access (One Zone-IA) storage class, depending on your file system. Amazon EFS lifecycle management automatically manages cost-effective file storage for your file systems. We should create a Lifecycle to, for example, move the objects from S3 Standard to Glacier after three months without using them. Usually, we use S3 Standard, EFS, and never remove the CloudWatch Logs. We could check the unused EBS volumes using the CLI > aws ec2 describe-volumes -region us-east-1 -filters Name=status,Values=availableĪfter that, we should confirm and delete the unused EBS volumes Configure S3/EFS/CloudWatchLogs Lifecycle policies For example, sometimes we terminate an EC2 and forget to delete the associated EBS. ![]() Orphan EBS volumes can be a significant source of cost in AWS. The good part is on a EC2 we don’t need to reboot the instance Remove unused EBS volumes Migrate a GP2 volume mounted on a EC2 to GP3 using the AWS CLI > aws ec2 modify-volume -volume-type gp3 -volume-id vol-11111111111111111 $0.08/GiB-month3,000 IOPS free and$0.005/provisioned IOPS-month over 3,000 125 MiB/s free and$0.04/provisioned MiB/s-month over 125MiB/s Throughput limit is between 128 MiB/s and 250 MiB/s, depending on the volume size. Volume typeģ IOPS/GiB (minimum 100 IOPS) to a maximum of 16,000 IOPSVolumes smaller than 1 TiB can also burst up to 3,000 IOPS. Also, the top performance of gp3 is four times faster than the maximum throughput of gp2 volumes, and you can use gp3 volumes for all use cases in which gp2 volume are suitable. Migrating GP2 volumes to GP3 will save 20% cost (RDS/EC2). However, we need to enable it and wait about 24 hours to collect data.įor RDS, the recommendation is to use the latest instances, and to check Cloudwatch to check the CPU/Mem consumption. The great news is that it also works for EBS, ECS on Fargate and Lambda (always based on your utilization data) It can also provide recommendations for the efficient use of Auto Scaling groups. ![]() For example, it can suggest how to downsize instances across instance families or switch to more powerful instances to avoid performance bottlenecks. The AWS Compute Optimizer provides additional recommendations for EC2 instances. The best way to do this on EC2 Instances is by using AWS Compute Optimizer. The newest instance types - typically provide higher efficiency or better performance at a lower price. We should use the right type for every EC2 and RDS, and always try to use the latest generation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |