--- id: awacs version: "2.6.0" license: New BSD license license_treatment: permissive maintenance: active --- # awacs — AWS Access Policy Language creation library License: permissive · Maintenance: active · Downloads: 808.6K/mo ## What it is and what it does awacs is a Python library for programmatically building AWS IAM access policies as JSON. Instead of hand-writing policy JSON, you write Python code using awacs classes like PolicyDocument, Statement, Principal, and Action, then serialize to JSON. The library validates policy structure and types as you build, catching common errors before the policy reaches AWS. It's designed to work with AWS IAM, S3, and other AWS services that accept policy documents. The library has no runtime dependencies, making it lightweight to add to infrastructure-as-code projects. It's actively maintained and supports Python 3.9 and later. Use it for: - Generate S3 bucket policies programmatically with validated principals, actions, and resources - Build IAM role trust policies in code rather than JSON templates - Create reusable policy templates by parameterizing awacs objects with account IDs and resource ARNs - Catch policy syntax errors during development instead of at AWS deployment time ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. awacs generates AWS IAM policy JSON from Python code, with built-in validation to catch policy format and type errors early. Yes. awacs is actively maintained, has no dependencies, supports current Python versions, carries no known vulnerabilities, and solves a real problem—writing AWS policies in code with validation. Use it if you're building infrastructure-as-code that needs to generate IAM policies programmatically. ## Install pip install awacs uv add awacs poetry add awacs ## Installing awacs Before you install: Low friction installation with no runtime dependencies. Active maintenance—last commit 2026-08-10, release 68 days ago—and supports current Python versions (3.9 through 3.14). License in practice: Licensed under New BSD (permissive), so you can use and modify freely in commercial or private projects with minimal restrictions. Quickstart: pip install awacs from awacs.aws import PolicyDocument, Statement, Allow, Action, Principal from awacs.iam import ARN as IAM_ARN from awacs.s3 import ARN as S3_ARN pd = PolicyDocument( Version="2012-10-17", Statement=[ Statement( Effect=Allow, Principal=Principal("AWS", [IAM_ARN("user/Bob", "", "123456789012")]), Action=[Action("s3", "*")], Resource=[S3_ARN("my_corporate_bucket/*")], ), ], ) print(pd.to_json()) Verify before relying: - Whether the deprecated awacs.aws.Policy object is still functional or already removed in version 2.6.0 - Scope of built-in property and type checking—which validation errors are caught at definition time vs. serialization time ## Package facts - License: New BSD license (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 808.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags AWS IAM policy generator, AWS access control policy Python, AWS policy JSON builder, IAM policy as code, AWS policy validation, aws-iam, policy-as-code, infrastructure [View on SkillFed](https://skillfed.io/packages/awacs) · [View on PyPI](https://pypi.org/project/awacs/)