<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yamahar</title>
    <description>The latest articles on DEV Community by Yamahar (@c19yamamoto).</description>
    <link>https://dev.to/c19yamamoto</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4256157%2F5452b570-bc10-4e5a-8924-33ff8d2ff948.jpg</url>
      <title>DEV Community: Yamahar</title>
      <link>https://dev.to/c19yamamoto</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/c19yamamoto"/>
    <language>en</language>
    <item>
      <title>Run AWS SDK Tests in Your App's Language with One CLI</title>
      <dc:creator>Yamahar</dc:creator>
      <pubDate>Fri, 20 Nov 2026 18:15:28 +0000</pubDate>
      <link>https://dev.to/c19yamamoto/run-aws-sdk-tests-in-your-apps-language-with-one-cli-4mbo</link>
      <guid>https://dev.to/c19yamamoto/run-aws-sdk-tests-in-your-apps-language-with-one-cli-4mbo</guid>
      <description>&lt;p&gt;An AWS Emulator gives your tests a local AWS API. Running an integration test still involves several steps: start the emulator, wait until it is ready, configure the SDK endpoint and certificate, then clean up when the test exits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/c19yamamoto/awesome-emulator-cli" rel="noopener noreferrer"&gt;&lt;code&gt;awesome-emulator-cli&lt;/code&gt;&lt;/a&gt; wraps the test command you already use and manages that lifecycle. Python stays in pytest, Java in Maven, Rust in Cargo, Go in &lt;code&gt;go test&lt;/code&gt;, and .NET in &lt;code&gt;dotnet test&lt;/code&gt;. Node.js runs the CLI; your application stays in its native runtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run a Boto3 test
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/c19yamamoto/awesome-emulator-cli-samples" rel="noopener noreferrer"&gt;sample repository&lt;/a&gt; includes a Python test that writes a value to S3 and reads it back. The client uses Boto3's normal environment-based configuration—there is no endpoint or certificate path in the test:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;uuid4&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;

&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;emulator_sample&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;store&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;round_trip&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_s3_round_trip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;s3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"s3"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;bucket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"sample-{uuid4().hex}"&lt;/span&gt;
    &lt;span class="n"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Bucket&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;round_trip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Hello from Python"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"Hello from Python"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Node.js 22 or later, Docker, and Python installed, clone the sample repository and install its dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/c19yamamoto/awesome-emulator-cli-samples.git
&lt;span class="nb"&gt;cd&lt;/span&gt; awesome-emulator-cli-samples
npm ci
python -m pip install -e &lt;span class="s1"&gt;'python[dev]'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the test through the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx awesome-emulator run --telemetry off -- python -m pytest -q python/tests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--telemetry off&lt;/code&gt; disables AWS Emulator telemetry for this run.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;run&lt;/code&gt; starts the emulator in Docker, waits for it to be healthy, provides the endpoint, emulator-generated credentials, region, and CA settings to pytest, then stops the emulator when pytest exits. The emulator keeps resources in memory, so each run starts with clean state. The first run downloads and verifies the emulator package and builds its image; later runs reuse it.&lt;/p&gt;

&lt;p&gt;The CLI also removes inherited AWS credentials, profiles, and service endpoint overrides from the child environment. This keeps a developer's host AWS settings from silently redirecting the test. The CLI itself has no production npm dependencies; Python and Boto3 remain the test project's dependencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use the same wrapper across SDKs
&lt;/h2&gt;

&lt;p&gt;The sample repository has working examples and GitHub Actions workflows for JavaScript, Python, Go, Java, Rust, and .NET. The command shape stays the same: &lt;code&gt;awesome-emulator run ... -- &amp;lt;your-test-command&amp;gt;&lt;/code&gt;. JavaScript runs with &lt;code&gt;node --test&lt;/code&gt;, Python with &lt;code&gt;pytest&lt;/code&gt;, Go with &lt;code&gt;go test&lt;/code&gt;, Java with Maven, Rust with Cargo, and .NET with &lt;code&gt;dotnet test&lt;/code&gt;. Java, Rust, and .NET can pass &lt;code&gt;--sdk&lt;/code&gt; to add their language-specific certificate settings.&lt;/p&gt;

&lt;p&gt;For workflows that seed data and test in separate steps, named sessions let the CLI keep track of the emulator lifecycle. With an initializer script of your own:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx awesome-emulator up --session ci --init -- python scripts/seed.py
npx awesome-emulator &lt;span class="nb"&gt;exec&lt;/span&gt; --session ci -- python -m pytest -q python/tests
npx awesome-emulator down --session ci
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In CI, run &lt;code&gt;down&lt;/code&gt; in an always-run cleanup step so the session also stops after a test failure.&lt;/p&gt;

&lt;p&gt;No AWS account or real credentials are needed for these examples. For SDK-specific options and the full language matrix, see the &lt;a href="https://github.com/c19yamamoto/awesome-emulator-cli/blob/main/docs/sdk-configuration.md" rel="noopener noreferrer"&gt;SDK configuration guide&lt;/a&gt; and &lt;a href="https://github.com/c19yamamoto/awesome-emulator-cli-samples" rel="noopener noreferrer"&gt;sample repository&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Know what the emulator covers
&lt;/h2&gt;

&lt;p&gt;AWS Emulator is for building and testing. Fidelity varies by service and feature, and the emulator does not evaluate IAM policies the way AWS does. Check the &lt;a href="https://docs.aws.amazon.com/emulator/latest/userguide/what-is-service.html#limitations" rel="noopener noreferrer"&gt;limitations&lt;/a&gt; and &lt;a href="https://docs.aws.amazon.com/emulator/latest/userguide/fidelity.html" rel="noopener noreferrer"&gt;fidelity scores&lt;/a&gt; for the APIs you use. Keep tests against AWS for behavior and security controls the emulator does not cover.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;awesome-emulator-cli&lt;/code&gt; is an independent project and is not affiliated with or endorsed by Amazon Web Services.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>testing</category>
      <category>devtools</category>
      <category>python</category>
    </item>
  </channel>
</rss>
