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.12.tar.gz
(10.2 kB
view hashes)
Built Distribution
Close
Hashes for aws_bucket_creator-0.0.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cc2c479f80839636d3a57b0567e55889b83a74fd62f47fd913042f6090c92e4 |
|
MD5 | c38910bd9c35488d196b81509246859b |
|
BLAKE2b-256 | 72919e90339c2278fc61accd95f82ea6612312b894d5245836a1986381998618 |
Close
Hashes for aws_bucket_creator-0.0.12-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 013e775cadf819a3732708d4806dcdd5fcb43a8e7c4335bf6fd5afb0267f379b |
|
MD5 | 49625bf783315df09154285c621436d9 |
|
BLAKE2b-256 | 66beea0aa71b68481ed9ce0a7439c08aed7b05a5fb4c45316284c14059620680 |