Performance and resource optimization
Deploying Applications on AWS
Dunieski Otano
Amazon Web Services Solutions Architect
Slow and expensive
The app feels slow during traffic spikes
The Lambda bill jumps the same month
Tuning makes it faster and cheaper
Concurrency for cost vs cold start
Reserved: cap and protect
Caps and guarantees capacity for a function
Cheapest control, but does nothing for cold starts
Provisioned: pay for warmth
Keeps instances pre-warmed, so there's no cold start
Costs more; use it only where latency truly matters
Right-sizing memory with the duration-cost curve
More memory = more CPU =
shorter duration
Cost = memory price x duration
The cheapest point is often in the
middle
Profile at several sizes, then pick
Application-level caching
Reuse work
inside the execution context
A warm Lambda keeps globals between invocations
Cache config, clients, and hot lookups
ElastiCache
for a shared cache across instances
CloudFront caching at the edge
CloudFront
: cache responses at edge locations
Serve repeat requests without hitting the backend
Cache keys can include
headers, query strings, cookies
Static and cacheable content scales for free
Choosing the right cache layer
Edge (CloudFront)
: static, widely shared content
Application (in-memory)
: per-instance hot objects
Data (ElastiCache/DAX)
: shared hot reads
Layer them; each cuts a different cost
Putting optimization together
Right-size memory from the
duration-cost curve
Add provisioned concurrency only where latency matters
Cache at the
edge, app, and data
layers
Measure, change one thing, measure again
Let's practice!
Deploying Applications on AWS
Preparing Video For Download...