The Secret Life of AWS: The Dress Rehearsal (Staging & Manual Approval)

 

The Secret Life of AWS: The Dress Rehearsal (Staging & Manual Approval)

Test changes in a live staging environment before they reach customers.





Part 39 of The Secret Life of AWS

Timothy was feeling invincible.

Since building his Assembly Line (Part 38), he had stopped worrying. He would write code, push it to GitHub, and let the robot handle the rest.

"Watch this," he told Margaret. "I'm changing the 'Buy Now' button to a 'soothing ocean blue'."

He changed the hex code.
git push origin main

The Pipeline lit up.

  • Source: Succeeded.
  • Build: Succeeded (npm test passed).
  • Deploy: Succeeded.

"Done," Timothy smiled. "Production is updated."

He opened the website.
His jaw dropped. The button wasn't "soothing ocean blue." It was invisible. He had typed white text on a white background.

"Customers can't see the button!" he panicked. "Nobody can buy anything!"

He frantically scrambled to revert the change.

"But... the tests passed!" Timothy stammered. "The robot said it was fine!"

"The robot checked the syntax," Margaret said calmly. "It did not check the reality."

"You pushed straight to Broadway without a Dress Rehearsal," she added. "You need a place to look at the play before the audience arrives."

The Parallel Universe

Margaret opened AWS CodePipeline.

"Right now, your pipeline is a straight line," she said. "Code -> Build -> Production."

"We are going to add a stop."

She edited the pipeline.

  1. Source: GitHub.
  2. Build: CodeBuild.
  3. Deploy (Staging): CheckoutFunction-Staging.

"This is a separate Lambda function," she explained. "It has its own URL. It connects to a test database. It is a clone of Production, but no customers live there. Only you."

The Gatekeeper

"Okay," Timothy said. "So the robot deploys to Staging. But how does it get to Production? Do I have to push it again?"

"No," Margaret said. "We simply pause the belt."

She added a generic action between Deploy (Staging) and Deploy (Production).
Action Type: Manual Approval.

"Now," she traced the line on the screen.

  1. The code goes to Staging.
  2. The pipeline Stops.
  3. It sends you an email: Review Required.
  4. If you click Approve, it continues to Production.

"You have a time machine," Margaret smiled. "You can see the future in Staging. If you don't like it, you reject it, and Production never changes."

The Second Attempt

Timothy fixed the button color.
git push origin main

The pipeline ran.

  • Deploy (Staging): Succeeded.
  • Manual Approval: Waiting for review.

Timothy clicked the link to the Staging URL.
The button was blue. It looked perfect. He clicked it. The checkout worked.

He went back to the Console and clicked Approve.

The pipeline turned green again.

  • Deploy (Production): Succeeded.

Timothy leaned back. He realized he wasn't just automating tasks anymore; he was controlling risk.

"I feel powerful," Timothy whispered. "I can stop a mistake before it exists."

"That is the difference between a Coder and an Engineer," Margaret noted. "A Coder hopes it works. An Engineer knows it works."


Key Concepts

  • Staging Environment: A replica of the production environment used for testing changes before they go live. It allows you to catch visual or logic errors that automated tests miss.
  • Manual Approval: A step in a Continuous Delivery pipeline that pauses execution until a human explicitly approves the continuation.
  • Continuous Delivery vs. Continuous Deployment:
  • Continuous Deployment: Every change goes straight to Production automatically (Part 38).
  • Continuous Delivery: Every change can go to Production, but waits for a human to push the button (Part 39).

Aaron Rose is a software engineer and technology writer at tech-reader.blog and the author of Think Like a Genius.

Comments

Popular posts from this blog

The New ChatGPT Reason Feature: What It Is and Why You Should Use It

Insight: The Great Minimal OS Showdown—DietPi vs Raspberry Pi OS Lite

Raspberry Pi Connect vs. RealVNC: A Comprehensive Comparison