- ec2_spawn - Create the instance and run a .create_tags which allows you to specify the name of the instance
- ec2_del - Run the script, paste your instance ID, Enter ... Profit
- s3_spawn - Create bucket with name specified, in the location specified, then call the .upload_file
- s3_del - Fetches the bucket name, checks files in bucket(iterates through objects.all), removes them(objects.delete) and deletes the bucket
- test_s3_check.py - My study file, when I was going thorugh the documentation.
- Object referes to a file in the bucket,
- Action can read the file we fetch with the previous command,
- Atributes can be .last_modified or .e_tag
Here we run python3 deploy.py or to run a specific service (eg. _instance() classes or the main() vpc infrastructure) comment out statements at the bottom of the file
- Create VPC and infrastructure
- Adding two EC2 instances
- ...
- To bring up the infrastructure run deploy.py
- If you wanna dabble with the setups of the infra, the file has method calls at the end which can be commented out
- To destroy the infrastructure, run ec2_destroy.py
- Creating a bucket, with general setting for example purposes (allowing you to pick and choose what policies you want)
- Assigning and updating stock policies
- Checking properties, listing isntances, checking available, handling error (allowing encryption if none is found)
- Single and multi stage file uploading
- Versioning of files and lifecycle policies
- Setting up a modular S3 webpage hosting service (can edit the index.html file, run again and it will push the changes nicely)
- For base S3 bucket setup, at the bottom of the s3_deploy.py file comment out everything under 'Create S3 infrastructure' and run python3 s3_deploy.py
- For S3 hosted web page, comment out everything under 'Deploy bucket hosted webpage' and run python3 s3_deploy.py
- Service cleanup (except for VPC network - for now):
- Destroy file created s3_destroy.py. If you wanna destroy the infrastructure, run the file.
- ... Voilah