{ "info": { "author": "Krist\u00f3f Jakab", "author_email": "jaksi07c8@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# awslog\n\nShow the history and changes between configuration versions of AWS resources\n\nUses AWS Config to fetch the configuration history of resources, only works on [resources supported by AWS Config](https://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html).\n\n![Screenshot](https://raw.githubusercontent.com/jaksi/awslog/master/screenshot.png)\n\n# Installation\n\n`pip install awslog`\n\n# Usage\n\nMake sure your [AWS credentials are properly configured](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html).\nYou can test it using the AWS CLI by issuing `aws sts get-caller-identity`. It should report information about your current CLI session and not raise any errors.\n\nMake sure [AWS Config](https://aws.amazon.com/config/) is set up to record configuration changes of your resources.\n\n## CLI\n\n```\nusage: awslog [-h] [--type TYPE] [--number NUMBER] [--before BEFORE]\n [--after AFTER] [--deleted] [--context CONTEXT] [--no-color]\n name\n\npositional arguments:\n name name or ID of the resource to query\n\noptional arguments:\n -h, --help show this help message and exit\n --type TYPE, -t TYPE the type of the resource to query list of supported\n resource types: https://docs.aws.amazon.com/config/lat\n est/developerguide/resource-config-reference.html\n --number NUMBER, -n NUMBER\n number of history items to show\n --before BEFORE, -b BEFORE\n show changes more recent than the specified date and\n time\n --after AFTER, -a AFTER\n show changes older than the specified date and time\n --deleted, -d include deleted resources\n --context CONTEXT, -c CONTEXT\n number of context lines in the diffs\n --no-color, -o disable colored output\n```\n\nExamples:\n```shellsession\n$ awslog sg-7235f203\n--- arn:aws:ec2:us-east-1:281519598877:security-group/sg-7235f203/configuration\t2018-09-12 23:44:36\n+++ arn:aws:ec2:us-east-1:281519598877:security-group/sg-7235f203/configuration\t2018-09-12 23:53:44\n@@ -1,24 +1,24 @@\n {\n \"description\": \"default VPC security group\",\n \"groupId\": \"sg-7235f203\",\n \"groupName\": \"default\",\n \"ipPermissions\": [\n {\n \"fromPort\": 80,\n \"ipProtocol\": \"tcp\",\n \"ipRanges\": [\n- \"1.1.1.1/32\"\n+ \"0.0.0.0/0\"\n ],\n \"ipv4Ranges\": [\n {\n- \"cidrIp\": \"1.1.1.1/32\"\n+ \"cidrIp\": \"0.0.0.0/0\"\n }\n ],\n \"ipv6Ranges\": [],\n \"prefixListIds\": [],\n \"toPort\": 80,\n \"userIdGroupPairs\": []\n }\n ],\n \"ipPermissionsEgress\": [\n {\n```\n\n```shellsession\n$ awslog --type AWS::IAM::User \\\n> --number 2 \\\n> --before '10 minutes ago' \\\n> --after '2018-01-01' \\\n> --deleted \\\n> --context 3 \\\n> --no-color \\\n> ReadOnly\n--- arn:aws:iam::281519598877:user/ReadOnly/configuration\t2018-09-13 11:28:16\n+++ arn:aws:iam::281519598877:user/ReadOnly/configuration\t2018-09-13 11:53:02\n@@ -1,10 +1,6 @@\n {\n \"arn\": \"arn:aws:iam::281519598877:user/ReadOnly\",\n \"attachedManagedPolicies\": [\n- {\n- \"policyArn\": \"arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess\",\n- \"policyName\": \"AmazonEC2ReadOnlyAccess\"\n- },\n {\n \"policyArn\": \"arn:aws:iam::aws:policy/AdministratorAccess\",\n \"policyName\": \"AdministratorAccess\"\n\n--- arn:aws:iam::281519598877:user/ReadOnly/configuration\t2018-09-13 10:58:19\n+++ arn:aws:iam::281519598877:user/ReadOnly/configuration\t2018-09-13 11:28:16\n@@ -4,6 +4,10 @@\n {\n \"policyArn\": \"arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess\",\n \"policyName\": \"AmazonEC2ReadOnlyAccess\"\n+ },\n+ {\n+ \"policyArn\": \"arn:aws:iam::aws:policy/AdministratorAccess\",\n+ \"policyName\": \"AdministratorAccess\"\n },\n {\n \"policyArn\": \"arn:aws:iam::aws:policy/IAMUserChangePassword\",\n```\n\n## Python module\n\n```python console\n>>> import boto3\n>>> import awslog\n>>> config = boto3.client('config')\n>>> after, before = list(awslog.get_config_history(config, 'AWS::EC2::SecurityGroup', 'sg-7235f203'))\n>>> print('\\n'.join(awslog.create_diff(after, before)))\n```\n\n```\n--- arn:aws:ec2:us-east-1:281519598877:security-group/sg-7235f203/configuration\t2018-09-12 23:44:36\n+++ arn:aws:ec2:us-east-1:281519598877:security-group/sg-7235f203/configuration\t2018-09-12 23:53:44\n@@ -1,24 +1,24 @@\n {\n \"description\": \"default VPC security group\",\n \"groupId\": \"sg-7235f203\",\n \"groupName\": \"default\",\n \"ipPermissions\": [\n {\n \"fromPort\": 80,\n \"ipProtocol\": \"tcp\",\n \"ipRanges\": [\n- \"1.1.1.1/32\"\n+ \"0.0.0.0/0\"\n ],\n \"ipv4Ranges\": [\n {\n- \"cidrIp\": \"1.1.1.1/32\"\n+ \"cidrIp\": \"0.0.0.0/0\"\n }\n ],\n \"ipv6Ranges\": [],\n \"prefixListIds\": [],\n \"toPort\": 80,\n \"userIdGroupPairs\": []\n }\n ],\n \"ipPermissionsEgress\": [\n {\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jaksi/awslog", "keywords": "amazon aws config log diff", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "awslog", "package_url": "https://pypi.org/project/awslog/", "platform": "", "project_url": "https://pypi.org/project/awslog/", "project_urls": { "Homepage": "https://github.com/jaksi/awslog" }, "release_url": "https://pypi.org/project/awslog/0.1.6/", "requires_dist": null, "requires_python": "", "summary": "Show the history and changes between configuration versions of AWS resources", "version": "0.1.6" }, "last_serial": 4973244, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "50ff74c1a3dc6fe6676e81d06fb1b41d", "sha256": "19778b2d349c719db13acd2e0502de957768d671a695b8513363cde1b2b4ea5e" }, "downloads": -1, "filename": "awslog-0.1.4.tar.gz", "has_sig": false, "md5_digest": "50ff74c1a3dc6fe6676e81d06fb1b41d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5551, "upload_time": "2018-09-13T10:30:33", "url": "https://files.pythonhosted.org/packages/26/79/1e3c02b2a02015c51a39acf001c195c12d02e019a3ee99897a04146080ca/awslog-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "8672016d2b0477af15038af172ca0c80", "sha256": "2353fe057da8dd94269e5376894afe293b22bbbca2d49b3009072293915efdff" }, "downloads": -1, "filename": "awslog-0.1.5.tar.gz", "has_sig": false, "md5_digest": "8672016d2b0477af15038af172ca0c80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5545, "upload_time": "2018-09-13T12:46:32", "url": "https://files.pythonhosted.org/packages/55/ab/62e032f9e23166eb06ba07ce380b4cf8e169fd8176692cbd0f73086d92b4/awslog-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "7d2fe8fd5cb3adb69a0bec58ddc62160", "sha256": "0887f154c1e2afe978a59ede2ca3d79b623febcc7b4db7fbee413e583d1fd374" }, "downloads": -1, "filename": "awslog-0.1.6.tar.gz", "has_sig": false, "md5_digest": "7d2fe8fd5cb3adb69a0bec58ddc62160", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5549, "upload_time": "2019-03-22T15:15:11", "url": "https://files.pythonhosted.org/packages/61/4b/680bef78f0829c05c2f98d2076fbc90e36af2fc1cc4d2b536ad05c904d2d/awslog-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7d2fe8fd5cb3adb69a0bec58ddc62160", "sha256": "0887f154c1e2afe978a59ede2ca3d79b623febcc7b4db7fbee413e583d1fd374" }, "downloads": -1, "filename": "awslog-0.1.6.tar.gz", "has_sig": false, "md5_digest": "7d2fe8fd5cb3adb69a0bec58ddc62160", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5549, "upload_time": "2019-03-22T15:15:11", "url": "https://files.pythonhosted.org/packages/61/4b/680bef78f0829c05c2f98d2076fbc90e36af2fc1cc4d2b536ad05c904d2d/awslog-0.1.6.tar.gz" } ] }