Metadata-Version: 2.1
Name: aws-bucket-creator
Version: 0.0.10
Summary: Creates S3 bucket, tags, policy and lifecycle policy via boto3.
Home-page: https://github.com/rubelw/aws_bucket_creator
Author: Will Rubel
Author-email: willrubel@gmail.com
License: UNKNOWN
Keywords: s3,bucket,creator
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Dist: boto3 (>=1.4.3)
Requires-Dist: requests (>=2.18)
Requires-Dist: Click (>=6.7)
Requires-Dist: configparser (>=3.5.0)
Requires-Dist: future (>=0.16.0)
Requires-Dist: six (>=1.11.0)
Requires-Dist: pip

AWS Bucket Creator
==================

Features
========

aws-bucket-creator creates a bucket, sets tags, logging, encryption, lifecycle, and policy


Installation
============

aws-bucket-creator is on PyPI so all you need is:

.. code:: console

   $ pip install aws-bucket-creator


Example
=======

Getting help

.. code:: console

   $ bucket-creator create --help
   Usage: bucket-creator create [OPTIONS]

   primary function for creating a bucket :return:

    Options:
      -i, --ini TEXT  INI file with needed information  [required]
      -v, --version   Print version and exit
      --debug         Turn on debugging
      --help          Show this message and exit.



.. code:: console

   $bucket-creator create -i config/my.ini


Example Ini file

.. code:: console

    [environment]
    region = us-east-1
    profile = myprofile

    [tags]
    ResourceOwner = no_me
    Project = some project
    DeployedBy = me


    [parameters]
    bucket_name = test-bucket
    acl = bucket-owner-full-control
    public_write_access = True
    days_to_glacier = 365
    days_to_standard_ia = 30
    event_lambda_arn = arn:aws:lambda:us-east-1:123456789:function:my-lambda
    bucket_policy = {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "AllowRoot",
                "Effect": "Allow",
                "Principal": {
                    "AWS": [
                        "arn:aws:iam::123456789:root"
                    ]
                },
                "Action": ["s3:*"],
                "Resource": [
                    "arn:aws:s3:::test-bucket/*",
                    "arn:aws:s3:::test-bucket"
                ]
            },
            {
                "Sid": "IPAllow",
                "Effect": "Allow",
                "Principal": {
                    "AWS": "*"
                },
                "Action": "s3:*",
                "Resource": [
                    "arn:aws:s3:::test-bucket/*",
                    "arn:aws:s3:::test-bucket"
                ],
                "Condition" : {
                    "IpAddress" : {
                        "aws:SourceIp": "192.128.1.1/32"
                    },
                    "NotIpAddress" : {
                        "aws:SourceIp": "192.168.1.1/32"
                    }
                }
            }
        ]
      }





