---
title: "Using proxymock with AWS Services | Speedscale"
description: "Record AWS API calls with proxymock, inspect the capture, and run local mocks while keeping IAM, signing, and cloud-state integration tests."
canonical: "https://speedscale.com/blog/using-proxymock-with-aws-services/"
---

[Site index](https://speedscale.com/blog/llms.txt) | [Markdown](https://speedscale.com/blog/using-proxymock-with-aws-services/index.md) | [Canonical page](https://speedscale.com/blog/using-proxymock-with-aws-services/)

# Using proxymock with AWS Services

Apr 10, 2025 (Updated: Oct 27, 2026 )

[By Kristopher Sandoval](https://speedscale.com/blog/author/kristopher-sandoval/)

[Developer Productivity](https://speedscale.com/blog/category/developer-productivity/) [Local Development Environments](https://speedscale.com/blog/category/local-development-environments/) [Service Mocking](https://speedscale.com/blog/category/service-mocking/)

* * *

A recorded AWS interaction is useful test input. It is not a local implementation of AWS. With `proxymock`, you can record the requests your application makes to supported AWS endpoints and answer matching calls from those recordings while developing locally.

![AWS services used by an application](https://speedscale.com/_astro/59e98642-e760-4916-9f0a-3db2a0f35b36.BT3z1eON_2s0iCw.webp)

Start with one read-only application path, such as listing objects through the S3 API. Record that path against a test account, then verify that the same application code receives the expected response from the mock. This gives you a concrete boundary to test before adding writes or asynchronous workflows.

## What an AWS mock can prove

A recorded response lets you test parsing, application decisions, and error handling for the cases you captured. You can also build explicit failure cases to check how the caller handles an error or a slow dependency. The [service virtualization versus mocking guide](https://speedscale.com/blog/service-virtualization-vs-mocking/) explains how these test boundaries differ.

It does not prove that IAM policies permit the operation, that AWS accepts the current signature, or that a sequence of writes produces the correct state. A captured S3 response does not implement bucket storage. A captured SQS response does not reproduce the queue’s delivery and visibility semantics. Keep integration tests against disposable AWS resources for behavior owned by AWS.

## Record one application workflow

Install and initialize `proxymock` using the [installation instructions](https://docs.speedscale.com/proxymock/getting-started/installation/). You need a configured API key and an application that can reach the test AWS service. Recording sends real requests, so use test data and credentials scoped to the operations you intend to exercise.

For a Python application whose entry point is `app.py`, start a recording in a dedicated directory:

```
proxymock record --out ./aws-recording -- python app.py
```

Replace `python app.py` with your application’s normal startup command. Exercise the selected read-only path, then stop the recording. Follow the [language configuration guide](https://docs.speedscale.com/proxymock/getting-started/language-reference/) for SDK proxy and certificate settings. A successful application call is not proof that it was captured: inspect the recorded request and response before continuing.

```
proxymock web --in ./aws-recording
```

Open the local address printed by the command. Confirm the AWS host, operation, request body, and response are present. Some SDKs do not honor the same proxy environment variables as ordinary HTTP clients, so resolve missing traffic before treating the recording as a usable mock.

LLM prompt for this step

```
Run my actual local Python app under proxymock with output ./aws-recording and exercise one synthetic AWS workflow. Inspect the saved traffic in proxymock web and verify required SDK exchanges without exposing credentials.
```

## Run against the recording

Restart the application with the recording as mock input:

```
proxymock mock --in ./aws-recording --no-passthrough -- python app.py
```

Exercise the same application path and inspect mock matches. The `--no-passthrough` flag prevents unmatched requests routed through the mock proxy from reaching the real service. Direct connections that bypass the proxy still require separate network controls if the test must be fully isolated.

A newly generated object key or request field can change matching. Investigate the mismatch and tune the fixture deliberately; do not remove meaningful request checks just to make the test pass. The [traffic replay tutorial](https://speedscale.com/blog/traffic-replay-tutorial/) shows how to inspect results rather than rely on a successful command exit alone.

LLM prompt for this step

```
Run the same Python app with dependencies from ./aws-recording and passthrough disabled. Verify expected outputs and confirm unmatched calls fail instead of reaching AWS. Keep live-service validation separate from the recorded-response test.
```

## AWS-specific checks to keep

AWS request signing includes values that change over time. The [Signature Version 4 documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html) describes how AWS authenticates signed requests. A local mock response is not evidence that AWS would accept the same request today.

For DynamoDB, inspect the operation carried in `X-Amz-Target` as well as the request body. For other services, use their actual method, path, query parameters, and headers. Review credentials, security tokens, account identifiers, and customer data before sharing a recording.

Throttling and error fixtures test the caller’s response to those conditions. They do not automatically model an AWS account’s quota consumption. Likewise, a mock cannot establish cross-service behavior such as an S3 event triggering Lambda or an SQS consumer processing a message exactly as it would in the deployed system.

## Keep the mock current

Re-record when the application changes its AWS calls or when an integration test shows that the fixture no longer reflects the dependency. Keep the capture date and the workflow it covers alongside the recording. Use the [proxymock local workflow](https://docs.speedscale.com/proxymock/getting-started/quickstart/local/) to repeat the capture, inspect, and mock cycle for each additional path.

## Run this workflow with an LLM

Give this prompt to a coding assistant with access to your project and this article. Supply environment-specific values it cannot discover.

Whole-workflow LLM prompt

```
Read https://speedscale.com/blog/using-proxymock-with-aws-services/ and inspect my project instructions first. Record one synthetic local Python workflow calling AWS, inspect the captured SDK exchanges, then rerun it with only recorded dependencies and passthrough disabled. Verify actual response behavior and unmatched calls and explain which live-service semantics still need a separate integration test. Check installed tool help before adapting commands. Report the checks actually run, their results, and anything you could not verify.
```

## Table of Contents

## Stop writing API mocks by hand

proxymock records real traffic from your running app and replays it as mocks for HTTP, gRPC, Postgres, Kafka, and more. Install locally, activate once, and start recording.

[Install proxymock](https://docs.speedscale.com/proxymock/getting-started/installation/) [View the docs](https://docs.speedscale.com/proxymock/)
