{"slug": "reviewing-more-than-code-how-ephemeral-environments-improved-our-pr-workflow", "title": "Reviewing More Than Code: How Ephemeral Environments Improved our PR Workflow", "summary": "A developer team at an unnamed company built an ephemeral environment on AWS to improve pull request review workflows, triggered by GitHub Actions, which builds a Docker image, pushes it to Amazon ECR, and updates a preview URL for each PR. The system allows reviewers to interact with features in a production-like environment without local setup, addressing the increased volume of changes from AI-assisted development tools like Copilot.", "body_md": "We’ve all reviewed pull requests that looked perfectly fine in the diff, only to discover later that the application behaved differently.\n\nThe reality is that reviewing code alone isn’t enough. Before merging, we still need to validate the feature, verify the user experience, and ensure nothing else has regressed.\n\nThe goal is not just to approve code. The goal is to merge with confidence.\n\nThis has become even more important with the rise of AI-assisted development. As tools like Copilot and agent-based coding assistants start opening pull requests for even small or incremental changes, the volume of changes increases — and so does the need to quickly and safely validate what those changes actually do in practice, not just in the diff.\n\nThat led us to a simple question:\n\n**What if every pull request came with its own preview link?**\n\nInstead of pulling the branch, installing dependencies, and running the application locally, reviewers could simply open a URL and interact with the feature exactly as an end user would.\n\nNo setup. No local builds. Just click, test, and merge with confidence.\n\nThis approach is commonly known as a **Preview Environment** or **Ephemeral Environment**.\n\nThe word ephemeral simply means **short-lived**.\n\nAn **ephemeral environment** is a temporary, isolated deployment of your application that’s created for a specific purpose, commonly used to test, review, or validate a pull request. Instead of relying on a shared staging environment, each pull request gets its own dedicated environment that closely mirrors what will eventually be merged into the main branch.\n\nOne of the biggest advantages of ephemeral environments is that they spin up a production-like environment with all of the application’s dependencies, configuration, and infrastructure already in place. Reviewers can simply open a unique preview URL and interact with the feature in a production-like environment.\n\nThis means developers, QA engineers, product managers, and designers are all validating the same deployed application\n\nUnlike other environments such as **development**, **staging**, and **production**, which are shared and long-lived, ephemeral environments exist only for the lifetime of a single feature or pull request. Every change is isolated, allowing multiple features to be developed, tested, and reviewed in parallel without affecting one another.\n\nWe wanted to improve our PR workflow by creating an environment that allowed the team to easily check the overall behavior of the code without putting in extra time.\n\nApproving pull requests is not just reviewing code. Our reviewers frequently needed to validate UI changes and backend behaviors before approving the pull request. That meant checking out branches, installing dependencies, configuring the application, and running it locally. Likewise, a product owner, stakeholder, or proof-of-concept reviewer needs to see the feature in action before giving feedback or approval.\n\nAs the number of pull requests grew, especially with AI-assisted development, this process became increasingly time-consuming. So, we decided to build an ephemeral environment on AWS that can be accessed by every stakeholder and check the changes before the code is merged.\n\nAs our application already runs on** **AWS, we wanted a solution that felt like a natural extension of our existing setup rather than introducing another deployment platform.\n\nWe wanted to keep the solution simple and easy to maintain, so we built a lightweight deployment pipeline using:\n\nLet’s look into how the workflow operates:\n\nWhen a pull request is opened or updated, a GitHub Actions workflow is triggered. The workflow builds a Docker image containing our backend application, which also serves the React frontend as static assets. Since our frontend is bundled into the backend, we don’t need to deploy or manage a separate frontend service for preview environments.\n\nThe Docker image is then pushed to Amazon ECR, and GitHub Actions updates an AWS Lambda function to use the newly built container image. Once the deployment completes, AWS Lambda exposes the application through a Lambda Function URL.\n\nFinally, GitHub Actions posts the generated preview URL as a comment on the pull request, allowing reviewers to open the application in their browser and interact with the feature without pulling the branch locally.\n\nThere are many ways to build preview environments, such as using ECS, EC2, or Kubernetes. For our use case, however, AWS Lambda was the right fit because it aligned well with both our existing architecture and our team’s workflow.\n\nOur goal was to build a simple deployment platform, which would reduce the time between opening a pull request and confidently reviewing a feature.\n\nAWS Lambda gave us a simple way to achieve that while keeping the operational overhead low.\n\nFor our team size and review workflow, Lambda provided a simple, reliable, and low-maintenance solution that integrated naturally into our existing AWS ecosystem.\n\nThe growing adoption of AI coding assistants and autonomous coding agents has made ephemeral environments more valuable than ever. It’s becoming increasingly common to ask an AI agent to implement a small feature, fix a bug, or refactor a piece of code and open a pull request automatically. The challenge isn’t generating the code; it’s validating that the generated change behaves correctly.\n\nEphemeral environments also help eliminate one of the most common frustrations in software development: **“It works on my machine.”**\n\nBecause everyone is reviewing the same deployed environment, differences in local operating systems, dependency versions, or development setups become far less likely to influence the outcome. The conversation shifts away from reproducing an issue locally and moves toward validating whether the application behaves as expected.\n\nBeyond AI-assisted development, ephemeral environments align naturally with modern engineering practices such as Continuous Integration and Continuous Delivery (CI/CD). They accelerate testing, shorten feedback loops, reduce dependency on shared staging environments, and allow multiple pull requests to be validated simultaneously. This not only improves developer experience but also enables teams to ship smaller, more frequent changes with greater confidence.\n\nOnce we introduced ephemeral preview environments, the tone of our pull request reviews changed.\n\nInstead of relying only on the code diff and hoping the behavior matched expectations, reviewers could open the preview link, interact with the feature, and verify that everything still worked as intended. That made it much easier to catch UI issues, backend regressions, and problems introduced while resolving merge conflicts before the code was merged.\n\nIt also opened the door for better collaboration across roles.\n\nDesigners could review the actual implementation and confirm that spacing, alignment, responsiveness, and visual details matched the intended experience. QA engineers could test the feature earlier and report issues before they reached production. Product owners and stakeholders could see progress in a real environment and give feedback sooner. For proof-of-concept work, it became much easier to demonstrate ideas and validate direction before investing more time.\n\nThat small shift had a big effect:\n\nWhat used to feel like a separate task, like pulling the branch, running the app locally, and manually checking the behavior, became part of the pull request itself.\n\nAnd as AI continues to accelerate software development, this workflow becomes even more valuable. Tools like GitHub Copilot and OpenHands can help engineers open pull requests faster, but faster code generation still needs a strong review process behind it. Preview environments give us a simple way to test those changes before they are merged and deployed.\n\nAI can help us move faster, but confidence still comes from seeing that the code actually works.\n\nSometimes the biggest productivity gain is not writing code quickly. It is making it effortless to review, test, and trust the work before it gets merged.\n\nEphemeral environments aren’t a new concept, nor is AWS Lambda the only way to implement them. Many engineering teams use platforms such as Bunnyshell, Vercel, Render, GitLab Review Apps, or Kubernetes-based solutions. Our implementation was tailored to our existing AWS architecture, allowing us to integrate preview environments into our workflow with minimal operational overhead while keeping the developer experience simple.\n\nIf you’re interested in learning more about ephemeral environments and how different teams implement them, here are some excellent resources:\n\n[Reviewing More Than Code: How Ephemeral Environments Improved our PR Workflow](https://pub.towardsai.net/reviewing-more-than-code-how-ephemeral-environments-improved-our-pr-workflow-a9c2ccd9a300) was originally published in [Towards AI](https://pub.towardsai.net) on Medium, where people are continuing the conversation by highlighting and responding to this story.", "url": "https://wpnews.pro/news/reviewing-more-than-code-how-ephemeral-environments-improved-our-pr-workflow", "canonical_source": "https://pub.towardsai.net/reviewing-more-than-code-how-ephemeral-environments-improved-our-pr-workflow-a9c2ccd9a300?source=rss----98111c9905da---4", "published_at": "2026-08-25 05:48:57+00:00", "updated_at": "2026-08-25 06:13:57.766598+00:00", "lang": "en", "topics": ["developer-tools", "ai-products"], "entities": ["AWS", "GitHub Actions", "Amazon ECR", "Copilot"], "alternates": {"html": "https://wpnews.pro/news/reviewing-more-than-code-how-ephemeral-environments-improved-our-pr-workflow", "markdown": "https://wpnews.pro/news/reviewing-more-than-code-how-ephemeral-environments-improved-our-pr-workflow.md", "text": "https://wpnews.pro/news/reviewing-more-than-code-how-ephemeral-environments-improved-our-pr-workflow.txt", "jsonld": "https://wpnews.pro/news/reviewing-more-than-code-how-ephemeral-environments-improved-our-pr-workflow.jsonld"}}