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
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
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
aws_bucket_creator-0.0.13.tar.gz
(10.2 kB
view hashes)
Built Distribution
Close
Hashes for aws_bucket_creator-0.0.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8cc6dd4f10127fb4c8c4a81e7d1c3b1048c3a9b41eb5ff94a8c80a058d02fac |
|
MD5 | de11e22fd604e51f14b3d14cb01ea044 |
|
BLAKE2b-256 | 57708c7309b5d933837ea4674056418ba34b4bd0ce0726d2395a31d8f20e4c78 |
Close
Hashes for aws_bucket_creator-0.0.13-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 607a9c0ad015d21b56ac78e89d56675191be9fe41aa5bd001dfe1bd941987a8f |
|
MD5 | 313fceb2fbeec298c270ca8a1bc1405c |
|
BLAKE2b-256 | 1f6855688144964d8c655081dcdc0f4959bcf0f1ee9724753fcaadddcc0570dc |