AWS Builder Center
The Last Known Good: My 5-Minute Safety Net for Faster Building

The Last Known Good: My 5-Minute Safety Net for Faster Building

A simple building habit that makes experimentation safer: keep a known-working state, change one thing at a time, and make failures easier to trace.

https://www.jayeshworks.cloud/

The Last Known Good: My 5-Minute Safety Net for Faster Building

Building something new is rarely a straight line.
You change one configuration, test a new service, update a dependency, modify a deployment setting—and suddenly something that was working five minutes ago is broken.
My favorite builder habit is simple:
Before making a risky change, keep a “last known good” version of the project, and change only one thing at a time.
It sounds obvious, but this small habit has saved me hours of debugging.

What is a “Last Known Good” state?

A Last Known Good (LKG) state is simply the most recent version of your project that you know is working correctly.
It could be:
  • A Git commit
  • A working Docker image
  • A known-good configuration
  • A stable deployment
  • Or even a small backup before experimenting
The important part is not the tool.
The important part is knowing:
“This is the point where everything was working.”

My workflow

I try to follow four simple steps.

1. Save the working state :

Before making a change that could affect multiple components, I make sure I have a recoverable working version.
For example:
Working → Save checkpoint → Experiment

2. Change One Thing :

Instead of changing the Docker configuration, environment variables, networking, and application code at the same time, I change one area first.
 Change A → Test → Change B → Test → Change C → Test 
If something fails, I already have a strong clue about where the problem came from.

3. Test Immediately :

I don't wait until several changes are finished before testing.
A quick test after each meaningful change gives me a much smaller debugging surface.
A five-minute test can prevent an hour-long investigation later.

4. Roll Back Without Hesitation :

If an experiment makes the system unstable, I don't spend another hour trying to fix the experiment just because I already invested time in it.
I go back to the last known good state and try the change again in a smaller way.

Why This Works

The biggest debugging problem is often not the error itself.
It's uncertainty.
When ten things changed between the last working version and the current broken version, every change becomes a suspect.
But when only one thing changed, the search space becomes much smaller.
Instead of asking:
“Why did everything break?”
I can ask:
“What did I change immediately before it broke?”
That difference can save a surprising amount of time.

The Bigger Lesson

I used to think that building faster meant making changes faster.
Now I think it means making changes that are easier to understand when they fail.
A good safety net doesn't make experimentation slower. It makes experimentation more confident.
You can try things, break things, learn, and still have a clear path back.

My Rule of Thumb

Before a risky change, I ask myself three questions:
  1. What is my last known good state?
  1. What exactly am I changing?
  1. How will I know whether the change worked?
If I can answer all three, I'm ready to experiment.

Final Thought

The goal isn't to avoid failure.
The goal is to make failure cheap, understandable, and reversible.
Sometimes the fastest way forward is simply knowing exactly where you can safely go back to.
Thank You
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article