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.11.tar.gz
(10.1 kB
view hashes)
Built Distribution
Close
Hashes for aws_bucket_creator-0.0.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a18b07a1a7773dc73a9f0c241817fa26ed1269417480c2b4d401294c1c118d7 |
|
MD5 | e2e93fb269dde4610bd652b1a8576f00 |
|
BLAKE2b-256 | 47283b233d91b362669ec5f3210c3eb16f9a80ac7912bc9d4ff1b03ccbf78919 |
Close
Hashes for aws_bucket_creator-0.0.11-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 296649dc743f1ae562b1388c5c9e659fe355d95718290f10b8b1394969424428 |
|
MD5 | 94361f3c8c7d6d9dee5d45d8f8b0352c |
|
BLAKE2b-256 | 5be08478479c8773087a0a0ba19c7769ae55ab2ca33962fecc169c5e6e1ba0e2 |