Skip to content

Commit daa6881

Browse files
authored
Add Architecture Diagram and Testing Section to Ephemeral Application Previews Tutorial (#266)
1 parent e3fb986 commit daa6881

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
167 KB
Loading

src/content/docs/aws/tutorials/ephemeral-application-previews.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,20 @@ This allows you to run end-to-end tests, preview features, and collaborate withi
3030

3131
This tutorial will show you how to use LocalStack's Ephemeral Instance feature to generate an Application Preview automatically for every new Pull Request (PR) using a GitHub Action workflow.
3232

33+
## Architecture diagram of the preview flow
34+
35+
![Ephemeral Previews Flow](/images/aws/empheral_previews_flow.png)
36+
37+
This diagram illustrates the ephemeral preview flow, where a GitHub Pull Request triggers a GitHub Actions workflow that automatically deploys the backend and frontend resources to a temporary LocalStack instance.
38+
The ephemeral instance generates a shareable application preview URL, allowing team members to test and validate the application in a production like environment.
39+
Once the Pull Request is closed or merged, the ephemeral instance is automatically shut down, ensuring no unnecessary costs are incurred.
40+
3341
## Prerequisites
3442

3543
- [LocalStack Web Application account](https://app.localstack.cloud/)
3644
- [GitHub Account](https://github.com/join) & [`gh` CLI](https://github.com/cli/cli?tab=readme-ov-file#installation) (optional)
3745

46+
3847
## Tutorial: Setting up Application Previews for your cloud application
3948

4049
This tutorial uses a [public LocalStack sample](https://github.com/localstack-samples/sample-notes-app-dynamodb-lambda-apigateway) to showcase a simple note-taking application using the modular AWS SDK for JavaScript.
@@ -189,6 +198,36 @@ After downloading, you can visualize logs and environment variables using a tool
189198
name: diagnose.json.gz
190199
path: ./diagnose.json.gz
191200
```
201+
## **Testing the application**
202+
203+
Once the Application Preview is successfully deployed on a LocalStack Ephemeral Instance, you can validate that your cloud application is functioning as expected before merging your Pull Request.
204+
205+
Follow the checklist below to verify the preview environment:
206+
207+
### **Testing the application checklist**
208+
209+
- **Preview URL Reachability:**
210+
Ensure the preview URL added as a comment on your Pull Request is accessible. Open the link to verify that the frontend application loads successfully in your browser.
211+
212+
- **Smoke Tests Execution:**
213+
Perform basic smoke tests to validate the core functionality of your application. For example, verify that API endpoints respond correctly, CRUD operations succeed, and authentication flows (if applicable) function as intended.
214+
215+
- **Backend Resource Validation:**
216+
Confirm that key AWS-like resources, such as DynamoDB tables, Lambda functions, and API Gateway endpoints, are deployed and operational within the LocalStack environment. You can use the `awslocal` CLI to inspect resources, for example:
217+
218+
```bash
219+
awslocal dynamodb list-tables
220+
awslocal lambda list-functions
221+
awslocal apigatewayv2 get-apis
222+
```
223+
224+
- **Frontend Verification:**
225+
Test that the deployed frontend connects correctly to the backend APIs exposed via LocalStack and that any user interactions (e.g., creating or retrieving data) work as expected.
226+
227+
228+
229+
230+
After completing these checks and confirming the application behaves as expected, your preview is considered validated and ready for review or merge.
192231

193232
## Conclusion
194233

0 commit comments

Comments
 (0)