Slide 1

Slide 1 text

AWS Cost Optimization 101 Michael Wittig cloudonaut.io

Slide 2

Slide 2 text

Michael Wittig ● Independent consultant at widdix ● Technical writer at cloudonaut ● Programming founder at marbot ● All things AWS.

Slide 3

Slide 3 text

How to reduce costs? ● Know your cost per account/region/service (see AWS Bill) ● Focus = $$$ ● Prioritize findings based on potential saving & effort/risk

Slide 4

Slide 4 text

General ● Delete unused resources ● Choose your region wisely

Slide 5

Slide 5 text

Service by Service

Slide 6

Slide 6 text

EC2 ● Purchase Savings Plans for baseline ● Switch to latest instance types ○ Make use of AMD or ARM based instances ● Verify that instance types still fit ● Use Spot Instances

Slide 7

Slide 7 text

EBS ● Use AWS Backup to management the lifecycle of snapshots ● Verify that the maximum I/O performance of the instance matches with the EBS volumes

Slide 8

Slide 8 text

RDS ● Enable RDS Storage Auto Scaling instead of over provisioning storage capacity ● Consider switching to Aurora Serverless (pause database) ● Switch to an Open Source database system (e.g., PostgreSQL instead of Oracle)

Slide 9

Slide 9 text

VPC ● Reduce NAT Gateway usage ○ Gateway VPC endpoints (S3 & DynamoDB) ○ Interface VPC endpoints for the rest ○ Change architecture? ● Reduce traffic between AZs

Slide 10

Slide 10 text

VPC

Slide 11

Slide 11 text

Route 53 ● Increase TTL for records to reduce queries ● Consolidate resolver endpoints

Slide 12

Slide 12 text

CloudFront ● Check hit/miss ratio of cache and adjust configuration and TTL accordingly ● Restrict access to S3 by using an Origin Access Identity

Slide 13

Slide 13 text

CloudTrail ● Check costs for data events (S3 and Lambda) ○ S3 Access Logs might be cheaper

Slide 14

Slide 14 text

S3 ● Consider using S3 Intelligent Tiering (works best with larger objects) ● Configure lifecycle policies to define a retention period for objects ● Use Glacier Deep Archive for long-term data archiving

Slide 15

Slide 15 text

CloudWatch ● Configure a retention period for all log groups ● Identify unnecessary custom metrics

Slide 16

Slide 16 text

Serverless ● Optimize memory configuration for Lambda functions ● Use Provisioned Concurrency to reduce costs for high traffic Lambda functions ● Evaluate HTTP APIs (beta) as an alternative to API Gateway

Slide 17

Slide 17 text

ECS ● Use Fargate instead of EC2 instances ● Purchase Savings Plans for Fargate ● Use Fargate Spot for non-production workloads

Slide 18

Slide 18 text

DynamoDB ● Switch to On-demand capacity mode for unsteady workloads ● Use auto-scaling to adjust the provisioned capacity to the workload

Slide 19

Slide 19 text

Elasticsearch ● Make use of Reserved Instances were planning ahead is feasible ● Evaluate UltraWarm tier (Preview) to retain large amounts of data at lower costs

Slide 20

Slide 20 text

One more thing...

Slide 21

Slide 21 text

Create an AWS Budget to monitor your bill

Slide 22

Slide 22 text

https://cloudonaut.io/rapid-docker-on-aws/