Registry /
type-stubs / mypy-boto3-amplifybackend
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AmplifyBackendClient
✓ from mypy_boto3_amplifybackend import AmplifyBackendClient
✗ from mypy_boto3_amplifybackend import AmplifyBackendClient
This quickstart demonstrates how to use `mypy-boto3-amplifybackend` to add type hints to your boto3 AmplifyBackend client calls. It includes defining request payloads using type definitions and ensures type safety for the client object and its methods.
import boto3
from mypy_boto3_amplifybackend import AmplifyBackendClient
from mypy_boto3_amplifybackend.type_defs import CreateBackendRequestRequestTypeDef, ResourceConfigTypeDef, AmplifyBackendTypeDef
def create_amplify_backend(app_id: str, app_name: str, region_name: str = "us-east-1") -> AmplifyBackendTypeDef:
"""
Demonstrates creating an Amplify Backend using a type-hinted boto3 client.
Note: A real backend creation requires more specific configurations
and an existing Amplify application. This is a minimal example for typing.
"""
# Initialize the AmplifyBackend client with type hints
client: AmplifyBackendClient = boto3.client("amplifybackend", region_name=region_name)
# Example minimal resource configuration
resource_config: ResourceConfigTypeDef = {
"BackendManagerAppId": "amplify", # Often "amplify" for Amplify Console managed backends
"AmplifyMetaConfig": {} # Typically contains ARN, Region, etc.
}
# Prepare the request payload using type definitions
request_payload: CreateBackendRequestRequestTypeDef = {
"AppId": app_id,
"AppName": app_name,
"ResourceConfig": resource_config,
"ResourceType": "Amplify", # Or "Auth", "Storage", "API" depending on what you're creating
}
try:
print(f"Attempting to create Amplify Backend for AppId: {app_id}, AppName: {app_name}...")
response: AmplifyBackendTypeDef = client.create_backend(**request_payload)
print("Backend creation initiated successfully.")
print(f"Operation ID: {response.get('OperationId')}")
print(f"App ID: {response.get('AppId')}")
return response
except client.exceptions.NotFoundException:
print(f"Error: Amplify App with ID '{app_id}' not found.")
except Exception as e:
print(f"An unexpected error occurred: {e}")
return {}
if __name__ == "__main__":
# Replace with your actual Amplify App ID and a desired app name
# Ensure AWS credentials are configured (e.g., via ~/.aws/credentials or environment variables)
# This example won't actually succeed without a valid pre-existing Amplify app ID
# and potentially more detailed ResourceConfig.
dummy_app_id = "d123456789abc" # This should be a real Amplify App ID for testing
dummy_app_name = "MyAmplifyBackendApp"
# To run this code, replace dummy_app_id and dummy_app_name with real values
# and ensure your AWS environment is configured for boto3.
# result = create_amplify_backend(dummy_app_id, dummy_app_name)
# print(result)
print("Quickstart complete. Modify `dummy_app_id` and `dummy_app_name` to test with real values.")
Debug
Known issues
breakingPython 3.8 support was removed for all `mypy-boto3` packages starting with `mypy-boto3-builder` version 8.12.0 (which generated `mypy-boto3-amplifybackend` 1.42.3).fixUpgrade your Python environment to 3.9 or higher, or downgrade to an older `mypy-boto3-amplifybackend` version (e.g., <1.42.0) if you must use Python 3.8.
affects: >=8.12.0 (builder), >=1.42.0 (service stubs)
breakingTypeDef naming conventions were changed in `mypy-boto3-builder` 8.9.0. This can break code that explicitly imports and uses specific TypeDef names if they were affected by the shortening of 'RequestRequestTypeDef' to 'RequestTypeDef' or the reordering of 'Extra' suffixes.fixReview your code for direct imports of TypeDefs and adjust names according to the new conventions, referring to the latest generated `type_defs.pyi` for the correct names.
affects: >=8.9.0 (builder), >=1.40.0 (service stubs)
gotchaFor full type-checking of dynamic `boto3.client()` and `boto3.resource()` calls (e.g., `boto3.client("amplifybackend")`), `mypy` must be configured with the `boto3.mypy_boto3_plugin`.fixAdd `plugins = boto3.mypy_boto3_plugin` to your `mypy` configuration file (e.g., `pyproject.toml` or `.mypy.ini`). Without this plugin, `mypy` might infer `Any` for the client object, reducing type-safety.
affects: All versions
gotcha`mypy-boto3` stub versions are designed to synchronize with `boto3` releases. Using a `mypy-boto3-amplifybackend` version that significantly differs from your installed `boto3` can lead to incorrect or missing type hints.fixAlways try to keep your `mypy-boto3-amplifybackend` package version in sync with your `boto3` installation. For example, if `boto3` is `1.28.x`, use `mypy-boto3-amplifybackend~=1.28.x`.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK for Python that these stubs type-check.
mypyoptionalThe static type checker that utilizes these stub files.