how to squeeze aws costs

18
How to squeeze AWS costs Jacek Migdał Warsaw, AWS User Group, 2015-09-24

Upload: jacek-migdal

Post on 14-Apr-2017

38 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: How to squeeze AWS costs

How to squeeze AWS costs

Jacek MigdałWarsaw, AWS User Group, 2015-09-24

Page 2: How to squeeze AWS costs

Who am I? The Cloud Juggler!

Senior Software Engineer at

Tripled engineering headcount in Europe!

We do logs in cloud:

● supercharged grep | awk in the browser● Google for your internal infrastructure

Many TB / day / client

Page 3: How to squeeze AWS costs

AWS ~= Industrial revolution

Page 4: How to squeeze AWS costs

Side effect: cost ~= pollution

Page 5: How to squeeze AWS costs

AWS bill. Engineering productivity or play?

Page 6: How to squeeze AWS costs

Challenge #1: Know your resources

Run and forget.

Problem both in development and production.

Page 7: How to squeeze AWS costs

Solution #1: Know your resources

Separate dev and prod:

● Separate AWS accounts.● Consolidated billing.● Simple to monitor and delete resources.● Additional benefits: isolation and

security.

Page 8: How to squeeze AWS costs

Solution #1: Know your resources

Monitor proactively:

● Tag and name resources in production.● Setup monitoring rules.● Get alert if you go over the limit.● Either AWS or 3rd party (CloudHealth).

Page 9: How to squeeze AWS costs

Solution #1: Know your resources

Shutdown by default:

● Terminate development resources after business hours.

● Notify by email.● Need to mark them to persist them.

Page 10: How to squeeze AWS costs

Challenge #2: Server capacity planning

Majority of the costs are EC2.

Some planning is needed to be cost efficient.

Page 11: How to squeeze AWS costs

Solution #2: Server capacity planning

Best way to run machines:

● Commit for a year, get 40% discount -> Reserved Instance.

● Use auto-scaling and spot.● Replace with S3, DynamoDB, ...

Page 12: How to squeeze AWS costs

Solution #2: Server capacity planning

Determine limiting metric and pick:

● Instance family (c3, m3, r3, …).● Right-size instance type and cluster size.

Initially guess than benchmark.

Optimize the code!

Page 13: How to squeeze AWS costs

Challenge #3: I have 100 items on my plate.

We are too busy and cost is yet another thing.

We don’t have time to do everything.

Page 14: How to squeeze AWS costs

Solution #3: I have 100 items on my plate.

Rhythm:

● Buy RI regularly (e.g. monthly).● Inspect aws resources regularly.● Setup cost alerts at different levels.

Page 15: How to squeeze AWS costs

Solution #3: I have 100 items on my plate.

Standardize and simplify:

● Instance types: fewer is easier for RI.● Divide system into smaller parts by tags.● Single owner with fallback.

Page 16: How to squeeze AWS costs

Solution #3: I have 100 items on my plate.

Define and measure:

● usage metrics: e.g. page views● potential optimizations impact vs. effort

If we have data, we will make the right decision.

If we have opinions, let's go with mine.

Page 17: How to squeeze AWS costs

Thank you