{"id":3007,"library":"mypy-boto3-acm","title":"mypy-boto3-acm","description":"mypy-boto3-acm provides type annotations for the `boto3` AWS Certificate Manager (ACM) service, generated by the `mypy-boto3-builder`. It enhances static analysis for `boto3` code, enabling robust type checking with tools like MyPy, Pyright, VSCode, and PyCharm. The library is currently at version 1.42.80, aligning with `boto3` versions, and is part of an actively maintained project with frequent updates.","status":"active","version":"1.42.80","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","type-hints","stubs","cloud"],"install":[{"cmd":"pip install mypy-boto3-acm","lang":"bash","label":"Install service stubs"},{"cmd":"pip install boto3 mypy","lang":"bash","label":"Install runtime and type checker"}],"dependencies":[{"reason":"Provides the underlying AWS SDK for Python. `mypy-boto3-acm` only provides type stubs, not the runtime library itself.","package":"boto3","optional":false},{"reason":"A static type checker for Python, used to leverage the provided type annotations.","package":"mypy","optional":true}],"imports":[{"note":"Imports the typed client for AWS Certificate Manager.","symbol":"ACMClient","correct":"from mypy_boto3_acm.client import ACMClient"},{"note":"Imports a specific TypedDict for request/response structures. Other TypeDefs exist for various API call parameters and responses.","symbol":"TagTypeDef","correct":"from mypy_boto3_acm.type_defs import TagTypeDef"}],"quickstart":{"code":"from typing import TYPE_CHECKING\nimport boto3\n\nif TYPE_CHECKING:\n    from mypy_boto3_acm.client import ACMClient\n    from mypy_boto3_acm.type_defs import CertificateSummaryTypeDef\n\n    # Example of a TypedDict for a specific API response item\n    # For a full list, refer to the mypy-boto3-acm documentation\n\ndef get_acm_certificates() -> list['CertificateSummaryTypeDef']:\n    client: ACMClient = boto3.client(\"acm\")\n    response = client.list_certificates()\n    certificates = response.get(\"CertificateSummaryList\", [])\n    return certificates\n\nif __name__ == \"__main__\":\n    # Example usage (requires AWS credentials configured)\n    try:\n        certs = get_acm_certificates()\n        if certs:\n            print(f\"Found {len(certs)} ACM certificates:\")\n            for cert in certs:\n                print(f\"  ARN: {cert['CertificateArn']}, Domain: {cert.get('DomainName')}\")\n        else:\n            print(\"No ACM certificates found.\")\n    except Exception as e:\n        print(f\"Error retrieving certificates: {e}\")","lang":"python","description":"This quickstart demonstrates how to use `mypy-boto3-acm` for type-hinting a `boto3` ACM client. It shows importing `ACMClient` and a relevant `TypeDef` for type-checking the response of `list_certificates`. The `TYPE_CHECKING` block ensures these imports are only used by type checkers, avoiding runtime dependencies if desired."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer. Consider using a virtual environment (e.g., `venv` or `conda`) to manage Python versions.","message":"Python 3.8 support was removed with `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 must upgrade their Python version to 3.9 or higher to use recent versions of `mypy-boto3-acm`.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-acm >= 1.42.80"},{"fix":"Ensure `mypy` is up-to-date. If using custom paths, verify they align with PEP 561's stub resolution order. For `stub-only` packages, they must be installed, not just added to `MYPYPATH`.","message":"The `mypy-boto3-builder` migrated to PEP 561 compliant packages in version 8.12.0. While this generally improves compatibility with `mypy`, older `mypy` versions or custom `MYPYPATH` configurations might require adjustments.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-acm >= 1.42.80"},{"fix":"Update your type hints to use the new, shorter TypeDef names. Consult the `mypy-boto3-acm` documentation for the correct TypeDef names for specific API calls.","message":"Starting from `mypy-boto3-builder` version 8.9.0, TypeDef naming conventions for method arguments were shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved. This can cause type errors if you're explicitly referencing older TypeDef names.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0"},{"fix":"Always ensure `pip install boto3` is executed in your environment alongside `pip install mypy-boto3-acm`.","message":"`mypy-boto3-acm` provides only type *stubs*. `boto3` (the actual AWS SDK for Python) must be installed separately for your code to run successfully at runtime.","severity":"gotcha","affected_versions":"All"},{"fix":"To resolve `pylint` warnings, you can explicitly set the types to `object` in the `else` branch of your `TYPE_CHECKING` block (e.g., `else: ACMClient = object`).","message":"When using `TYPE_CHECKING` blocks for conditional imports, `pylint` may complain about 'undefined variables' in the `else` branch. This is a known issue with `pylint`'s handling of these blocks.","severity":"gotcha","affected_versions":"All, with Pylint"},{"fix":"It is recommended to use `boto3-stubs-lite` if available for the service (though `mypy-boto3-acm` is a full stub package) or to disable PyCharm's built-in type checker and rely solely on `mypy` or `pyright`.","message":"PyCharm users might experience slow performance or high CPU usage due to `Literal` overloads in `boto3-stubs`. This is a known issue (PY-40997).","severity":"gotcha","affected_versions":"All, with PyCharm"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}