Creates S3 bucket, tags, policy and lifecycle policy via boto3.
Project description
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:
$ pip install aws-bucket-creator
Example
Getting help
$ 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.
$bucket-creator create -i config/my.ini
Example Ini file
[environment]
region = us-east-1
profile = myprofile
[tags]
ResourceOwner = no_me
Project = some project
DeployedBy = me
[parameters]
bucket_name = test-bucket
principals = arn:aws:iam::123456789:root
acl = bucket-owner-full-control
public_write_access = True
days_to_glacier = 365
days_to_standard_ia = 30
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"
}
}
}
]
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for aws_bucket_creator-0.0.7-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9072c217f8727ef17b9d39a97e3782f2272f10d0cfab825f241ec2154944720 |
|
MD5 | 35e7e12c1e9c3e26d10df7edd13d84ff |
|
BLAKE2b-256 | b1ca8f2963b10b5ae9bf90007714ef5631ebae4d38db88194150775a639a8011 |