Webotron 20 is a tool to deploy static website to AWS.
Project description
Automating AWS with Python
Repository for the A Cloud Guru course Automating AWS with Python
01-webotron
Webotron is a script that will sync a local directory to an s3 bucket, and optionally configure Route 53 and cloudfront as well.
Features
Webotron currently has the following features:
- List bucket
- List contents of a bucket
- Create and set up bucket
- Sync directory tree to bucket
- Set AWS profile with --profile=<profile_name>
- Configure route 53 domain
- Configure Cloud Front distribution with SSL
##Installation pip install webotron-20
##Using webotron-20
-
Setup AWS profile. .AWS/config
-
Use profile to use/access AWS resources.
-
PS C:\Users\Rishu> webotron Usage: webotron [OPTIONS] COMMAND [ARGS]...
Webotron deploys websites to AWS.
Options: --profile TEXT Use a given AWS profile. --help Show this message and exit.
Commands: find-cert Find a certificate for given domain. list-bucket-objects List objects in s3 bucket. list-buckets List all s3 buckets. setup-bucket Create and configure s3 bucket for Static Website... setup-cdn To Setup a cloud frot for given domain and bucket. setup-domain Configure DOMAIN to point to BUCKET. sync Sync contents from Path to Bucket.
-
Examples PS C:\Users\Rishu> webotron --profile=pythonAutomation list-buckets s3.Bucket(name='kittentest.techenvision.net') PS C:\Users\Rishu> webotron --profile=pythonAutomation list-bucket-objects kittentest.techenvision.net s3.ObjectSummary(bucket_name='kittentest.techenvision.net', key='css/main.css') s3.ObjectSummary(bucket_name='kittentest.techenvision.net', key='images/Balinese-kitten1.jpg') s3.ObjectSummary(bucket_name='kittentest.techenvision.net', key='images/Maine_coon_kitten_roarie.jpg') s3.ObjectSummary(bucket_name='kittentest.techenvision.net', key='images/SFSPCA_Kitten.jpg') s3.ObjectSummary(bucket_name='kittentest.techenvision.net', key='index.html')
PS C:\Users\Rishu> webotron --profile=pythonAutomation sync "D:\Tech\Automate AWS with Python\code\automating-aws-with-python\01-webotron\kitten_web" kittentest.techenvision.net File has been successfully added : css/main.css File has been successfully added : images/Balinese-kitten1.jpg File has been successfully added : images/Maine_coon_kitten_roarie.jpg File has been successfully added : images/SFSPCA_Kitten.jpg File has been successfully added : index.html File has been successfully deleted : webotron.py File has been successfully deleted : certificate.py File has been successfully deleted : cdn.py File has been successfully deleted : domain.py File has been successfully deleted : init.py File has been successfully deleted : util.py File has been successfully deleted : bucket.py Sync is successful. Your bucket URL is: http://kittentest.techenvision.net.s3-website.us-east-2.amazonaws.com
PS C:\Users\Rishu> webotron --profile=pythonAutomation find-cert kittentest.techenvision.net {'CertificateArn': 'arn:aws:acm:us-east-1:637555073356:certificate/56b961ea-f789-42a1-97fa-8328ccaa4a77', 'DomainName': 'techenvision.net'}
PS C:\Users\Rishu> webotron --profile=pythonAutomation setup-cdn kittentest.techenvision.net kittentest.techenvision.net Distribution already exists. Creating Alias Record. Domain configured: https://kittentest.techenvision.net PS C:\Users\Rishu>
-
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webotron-20-0.4.tar.gz.
File metadata
- Download URL: webotron-20-0.4.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9418bacbbdfcae09e5da32d7954dd3a9d13d28a98c8fbc168face087b93b43ed
|
|
| MD5 |
b807cb5369afc836348912e721c8b717
|
|
| BLAKE2b-256 |
fcf2f500689c92334eeae187958adb24568a06cda4a29d1510bc8c8c4ea12519
|
File details
Details for the file webotron_20-0.4-py3-none-any.whl.
File metadata
- Download URL: webotron_20-0.4-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32f36b57150045c5e8cf149abc9d524547487fc376d0cb38aeac5b2d4b3261ce
|
|
| MD5 |
abd56e801a4fb966775580ee8ab2e68b
|
|
| BLAKE2b-256 |
20806eb4ebc784f14e158ce3c4c7ef74accbd406d7d439d4ce7061123f57fe39
|