{ "info": { "author": "Lukas Jackowski", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": "# s3-unique-bucket\nUtility to create a unique bucket for each S3 account, useful for deployment scenarios.\n\nDid you ever need a bucket to upload your deployment templates into? Are you always annoyed by having to create them manually, not really making your deployment pipeline truly automatic? Well, worry no more!\n\nThis script is an **easy** and **idempotent** way to just create an S3 bucket that will have a very high chance to avoid name conflicts.\nIf run a second time, the script recognizes the bucket already exists and will only emit the bucket's name for reuse.\n\n## Example\n````bash\nbucket=$(s3-unique-bucket)\naws s3 cp foo.txt s3://$bucket/foo.txt\n````\n\n## How it works\nThe bucket name is generated from a user-settable prefix, the sha1 hash of the account ID with base32 encoding, and the region the bucket is created in.\nThen the script checks if a bucket with this name exists on the provided account. If not, it is created. Then finally the name of the bucket is emitted via `stdout`.\n\n## Documentation\nSet the AWS credentials and region with environment variables.\n* `AWS_ACCESS_KEY_ID`\n* `AWS_SECRET_ACCESS_KEY`\n* `AWS_DEFAULT_REGION`\n\nThe rest is configured with command line arguments.\n\n#### `-p`/`--prefix`: User-settable prefix (OPTIONAL)\n**Default**: `account-bucket`\n\nThe bucket name starts with this settable prefix. It can also be empty. Note that a dash ('-') is automatically added between the prefix and the hash if prefix is not empty.\n\n#### `-p`/`--prefix`: AWS Account Region (CONDITIONAL)\n**Condition**: Must be provided if environment variable `AWS_DEFAULT_REGION` isn't set.\n\nWhich region the bucket shall be created in.", "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/DrLuke/s3-unique-bucket", "keywords": "aws s3 bucket unique ci cd", "license": "", "maintainer": "", "maintainer_email": "", "name": "s3-unique-bucket", "package_url": "https://pypi.org/project/s3-unique-bucket/", "platform": "", "project_url": "https://pypi.org/project/s3-unique-bucket/", "project_urls": { "Homepage": "https://github.com/DrLuke/s3-unique-bucket" }, "release_url": "https://pypi.org/project/s3-unique-bucket/0.1.0/", "requires_dist": null, "requires_python": ">=3.6, <4", "summary": "Insures a unique S3 bucket exists for the account", "version": "0.1.0" }, "last_serial": 5150620, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "cef453837f19af53c96e1dd84fa0dbdf", "sha256": "82f3d4aa206f77cfca79a3bf2a87e5ad54dbe7e91c881f2302d39e2075e11df9" }, "downloads": -1, "filename": "s3_unique_bucket-0.1.0.tar.gz", "has_sig": false, "md5_digest": "cef453837f19af53c96e1dd84fa0dbdf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 3016, "upload_time": "2019-04-16T15:12:02", "url": "https://files.pythonhosted.org/packages/ab/d4/1723bbe4564444b5555b63fe9f4365e79045246be36fdc9e52c0237b65f3/s3_unique_bucket-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cef453837f19af53c96e1dd84fa0dbdf", "sha256": "82f3d4aa206f77cfca79a3bf2a87e5ad54dbe7e91c881f2302d39e2075e11df9" }, "downloads": -1, "filename": "s3_unique_bucket-0.1.0.tar.gz", "has_sig": false, "md5_digest": "cef453837f19af53c96e1dd84fa0dbdf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 3016, "upload_time": "2019-04-16T15:12:02", "url": "https://files.pythonhosted.org/packages/ab/d4/1723bbe4564444b5555b63fe9f4365e79045246be36fdc9e52c0237b65f3/s3_unique_bucket-0.1.0.tar.gz" } ] }