What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Passing unit tests does not prove that a deployed HTTP API works: a handler-only test skips API Gateway routing, deployment configuration, and the real network request path. For a Python 3.11 API built with AWS SAM, API Gateway, and Lambda, use unit tests for application logic, local HTTP integration tests for the SAM-simulated path, and deployed HTTP integration tests for the live endpoint. Each layer finds a different class of failure.
What each test layer checks
The workflow described by Gloria, writing for AWS Community Builders, separates tests by the request path they exercise. The distinction matters: a passing test is evidence about the path it actually ran, not every layer behind the API.
| Test layer | Request path | Prerequisites | Useful for finding |
|---|---|---|---|
| Unit | Calls the Lambda handler directly; does not traverse API Gateway. | Python and the test dependencies; no AWS account or Docker is needed for this handler-level check. | Application logic errors, such as incorrect handling of a query parameter. |
| Local HTTP integration | Sends HTTP requests to the API running under sam local start-api, using SAM’s local simulation. |
AWS SAM CLI and Docker. | Issues in the local HTTP route and handler wiring. The local simulation is not the deployed AWS environment. |
| Deployed HTTP integration | Sends real network requests to the deployed API Gateway URL, which invokes Lambda through the deployed configuration. | A deployed stack and AWS credentials; the sample also uses boto3 to look up the stack output and requests to call the endpoint. |
Deployment wiring, API Gateway behavior, and HTTP behavior on the live request path. |
Gloria characterizes local checks in the example as free and deployed checks as pay-per-request; those are descriptions of that project, not universal cost estimates. Actual AWS charges depend on the services and usage in your account.
Run checks locally before testing the deployed endpoint
Start with the unit suite, then run the local API and send HTTP requests through it. This is a practical way to catch handler and local routing problems before relying on a deployment. The local step requires Docker and SAM Local, but not an AWS account, according to Gloria’s example.
#1 Best Overall
-
Run the unit tests against the Lambda handler. These tests should check the handler’s expected behavior without claiming to test API Gateway.
-
Start the local API with
sam local start-apiand run the local HTTP integration tests against the resulting local endpoint. Keep the tests focused on observable HTTP behavior as well as the returned content.
SAM’s local simulation and a deployed API can differ. Treat local success as useful feedback, not a substitute for a request to the deployed endpoint. Confirm behavior against the actual API configuration and installed SAM and AWS versions.
Automate tests against the deployed stack
For deployed checks, Gloria’s example obtains the API URL from the CloudFormation stack rather than hard-coding it into each test. The fixture reads AWS_SAM_STACK_NAME, calls CloudFormation’s describe_stacks, maps stack output keys to endpoint URLs, and supplies those URLs to pytest tests. The sample dependencies include boto3 for the AWS lookup and requests for HTTP calls.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitches-
Deploy the SAM stack and make its name available as
AWS_SAM_STACK_NAME. The test runner also needs AWS credentials permitted to describe that stack. -
Use a pytest fixture to retrieve the stack outputs with CloudFormation
describe_stacksand select the API endpoint URL. -
Send requests to that endpoint with
requests, then assert the response at the HTTP boundary: status, body, headers, route behavior, and method behavior that your API contract defines. -
Run the deployed tests after deployment. A manual browser or
curlrequest is a useful initial check that the endpoint responds, but it does not replace repeatable assertions in the automated suite.Recommended: Fix Windows Errors and Clear Junk Files in Minutes - Free Scan →Recommended: Update Every Outdated Driver on Your PC in One Scan - Free →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
The retrieved DEV Community page, by Gloria writing for AWS Community Builders, is dated “Sep 17” without a year in the available page text. Its reported test counts and timings below are the author’s results for that project, not independently reproduced benchmarks.
Rank #4
Assert the API’s observable HTTP behavior
The example tests several distinct behaviors: the default greeting, a supplied name query parameter, response headers, HTML from /get-documentation, HTML from /, an unknown route, and a rejected POST request. For your own API, the expected status and response are contract-specific; test the behavior you intend clients to rely on rather than copying example expectations blindly.
The unknown-route result illustrates why test layers should not be conflated. Gloria reports that the local example returns 404 for an unknown route, while the deployed API Gateway endpoint returns 403 with “Missing Authentication Token” before Lambda executes. That is a difference in the request path and the layer producing the response, not a universal promise about API Gateway. Check the actual route configuration and deployment when setting your expected result.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Test missing and empty query parameters separately
A green suite can still miss an edge case. After reporting seven deployed tests passing, Gloria tried /hello?name= and observed Hello, !. In the example implementation, query_params.get("name", "World") uses World only when the key is absent. If the key exists with an empty string, the returned value is still empty.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11If an empty name should use the default greeting, the suggested implementation is:
query_params.get("name") or "World"
This treats both an absent value and an empty string as falsey, so both select World. Add a regression assertion for the empty-string case at each layer where that behavior matters: handler unit test, local HTTP integration test, and deployed HTTP integration test. The distinction is useful beyond greetings: APIs should define whether empty values, missing values, and other edge inputs are equivalent or have different meanings.
What the example’s counts and timings show
Gloria reports 15 unit tests, 6 local integration tests, and 7 deployed integration tests: 28 tests total. For that project, the author reports 0.16 seconds for unit tests, 11.53 seconds for local integration tests, and 21.25 seconds for deployed integration tests. These are the author’s reported run results, not general speed expectations; test environment, network, and implementation can change timings.
After proposing an empty-name regression test at each layer, the article gives expanded counts of 16 unit, 7 local integration, and 8 deployed integration tests, or 31 total. That is a proposed count, not a verified run result.
Free tools Windows power users keep installed
One-click scans. No signup required.
As Gloria puts it: “Unit tests prove your logic. Integration tests prove your wiring. Both are necessary. Neither replaces the other.” Use a failure to identify the relevant layer, fix the behavior there, and retain a regression test so the same case remains covered.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




