{"id":13821126,"url":"https://github.com/cloudtools/awacs","last_synced_at":"2025-05-14T08:06:10.647Z","repository":{"id":7698385,"uuid":"9062692","full_name":"cloudtools/awacs","owner":"cloudtools","description":"Python library for AWS Access Policy Language creation","archived":false,"fork":false,"pushed_at":"2025-05-12T05:25:30.000Z","size":1639,"stargazers_count":394,"open_issues_count":14,"forks_count":101,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-05-12T06:32:13.458Z","etag":null,"topics":["aws-iam","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudtools.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-03-27T20:16:27.000Z","updated_at":"2025-05-12T05:25:34.000Z","dependencies_parsed_at":"2024-01-01T06:24:04.067Z","dependency_job_id":"2b8622e6-f902-43c5-acd1-db319e3a719b","html_url":"https://github.com/cloudtools/awacs","commit_stats":{"total_commits":380,"total_committers":38,"mean_commits":10.0,"dds":0.6921052631578948,"last_synced_commit":"ea9aa8518d1f27af1532545db0cdf7c52d372ab9"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudtools%2Fawacs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudtools%2Fawacs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudtools%2Fawacs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudtools%2Fawacs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudtools","download_url":"https://codeload.github.com/cloudtools/awacs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101615,"owners_count":22014909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-iam","python"],"created_at":"2024-08-04T08:01:15.715Z","updated_at":"2025-05-14T08:06:05.625Z","avatar_url":"https://github.com/cloudtools.png","language":"Python","readme":"=====\nawacs\n=====\n\n.. image:: https://img.shields.io/pypi/v/awacs.svg\n    :target: https://pypi.python.org/pypi/awacs\n\n.. image:: https://travis-ci.org/cloudtools/awacs.png?branch=master\n    :target: https://travis-ci.org/cloudtools/awacs\n\n.. image:: https://img.shields.io/pypi/l/awacs.svg\n    :target: https://opensource.org/licenses/BSD-2-Clause\n\nAbout\n=====\n\nawacs - Amazon Web Access Control Subsystem\n\nThe awacs library allows for easier creation of AWS Access Policy\nLanguage JSON by writing Python code to describe the AWS policies.\nTo facilitate catching  policy format or JSON errors early the\nlibrary has property and type checking built into the classes.\n\n**NOTE:** The old *awacs.aws.Policy* object is going to be deprecated in the\nfuture, in preference for the *awacs.aws.PolicyDocument* class. This is due\nto confusion that arises between the old object and *troposphere.iam.Policy*\nobjects.\n\n\nInstallation\n============\n\nawacs can be installed using the pip distribution system for python by\nissuing:\n\n.. code-block:: sh\n\n  $ pip install awacs\n\nAlternatively, you can run use setup.py to install by cloning this repository\nand issuing:\n\n.. code-block:: sh\n\n  $ python setup.py install\n\nExamples\n========\n\nAn example to use this comes from the `AWS IAM`_ documentation.\nThis shows creating policy attached to an Amazon S3 bucket:\n\n.. code-block:: python\n\n  from awacs.aws import Action, Allow, PolicyDocument, Principal, Statement\n  from awacs.iam import ARN as IAM_ARN\n  from awacs.s3  import ARN as S3_ARN\n\n  account = \"123456789012\"\n  user = \"user/Bob\"\n\n  pd = PolicyDocument(\n      Version=\"2012-10-17\",\n      Id=\"S3-Account-Permissions\",\n      Statement=[\n          Statement(\n              Sid=\"1\",\n              Effect=Allow,\n              Principal=Principal(\"AWS\", [IAM_ARN(user, '', account)]),\n              Action=[Action(\"s3\", \"*\")],\n              Resource=[S3_ARN(\"my_corporate_bucket/*\"),],\n          ),\n      ],\n  )\n  print(pd.to_json())\n\nwould produce this json policy:\n\n.. code-block:: json\n\n  {\n      \"Id\": \"S3-Account-Permissions\", \n      \"Statement\": [\n          {\n              \"Action\": [\n                  \"s3:*\"\n              ], \n              \"Effect\": \"Allow\", \n              \"Principal\": [\n                  {\n                      \"AWS\": [\n                          \"arn:aws:iam::123456789012:user/Bob\"\n                      ]\n                  }\n              ], \n              \"Resource\": [\n                  \"arn:aws:s3:::my_corporate_bucket/*\"\n              ], \n              \"Sid\": \"1\"\n          }\n      ], \n      \"Version\": \"2012-10-17\"\n  }\n\nCommunity\n=========\n\nWe have a google group, cloudtools-dev_, where you can ask questions and\nengage with the cloudtools/awacs community.  Issues \u0026 pull requests are always\nwelcome!\n\n.. _`AWS IAM`: http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html\n.. _cloudtools-dev: https://groups.google.com/forum/#!forum/cloudtools-dev\n\nContributing new actions\n========================\n\nTo update actions there is a generator tool which will scrape policies from\nAWS's documentation resource and auto-generate new files.\nThe following commands can be run (with Python 3.7+) to update the repo:\n\n.. code-block:: sh\n\n  $ python3 -m pip install -r scrape/requirements.txt\n  $ python3 -m pip install .\n  $ python3 ./scrape/scrape.py\n  $ git diff\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudtools%2Fawacs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudtools%2Fawacs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudtools%2Fawacs/lists"}