Skip to main content

Creates S3 bucket, tags, policy and lifecycle policy via boto3.

Project description

AWS Bucket Creator


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


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

.. code:: console

$ pip install aws-bucket-creator


aws_bucket_creator tutorial


Getting help

.. code:: console

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

primary function for creating a bucket :return:

  -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 upsert -i config/my.ini


* acl can be: 'private', 'public-read', 'public-read-write', 'authenticated-read', 'aws-exec-read', 'bucket-owner-read','bucket-owner-full-control'
* aes-256 encryption is turned-on by default, and can not be turned off for security reasons
* public_read access can not be turned on for security reasons
* default days before going to standard-ia is 30
* default days before going to glacier is 365

Example Ini file

.. code:: console

region = us-east-1
profile = my_aws_profile

ResourceOwner = not_me
Project = some project
DeployedBy = me

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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aws-bucket-creator, version 0.0.19
Filename, size File type Python version Upload date Hashes
Filename, size aws_bucket_creator-0.0.19-py2-none-any.whl (11.0 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size aws_bucket_creator-0.0.19.tar.gz (11.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page