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
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
Built Distribution
Close
Hashes for aws_bucket_creator-0.0.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3da8d4c5a14d4331456ab537ea8c18c47b0b9252ba978c9e76a5faf8d9479574 |
|
MD5 | 505095d29b105c196e535dce14870883 |
|
BLAKE2b-256 | c10617adcce0d59b8b07d6d11be4a5d206a39f7078bf48eeddc1627256ec92a9 |
Close
Hashes for aws_bucket_creator-0.0.10-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77afb077d41dbd0502e80a1d31654b159720e7b15a1aba11b5c1e3724c922693 |
|
MD5 | e4fd87bce8d3e555bdd2bbc1047eb311 |
|
BLAKE2b-256 | aab330a4bdbdaa4546ab8d3e7e6a78d5e68e7142a7543403787ccc5d0987504c |