Lesson 03Build

Setting log retention

Lambda logs to CloudWatch automatically — but keeps every log line forever unless you tell it otherwise.

Every Lambda invocation writes to CloudWatch Logs automatically — you don't opt in, and by default you don't opt out either. Left alone, those logs accumulate forever. For a function you call constantly, "forever" is a real storage bill, not a hypothetical one.

Locked

Complete the previous step first

This exercise builds on Creating a function — run synth & validate there until every assertion passes, then this code will unlock.

Go to Creating a function