This repository contains a comprehensive guide and necessary files to help you understand and implement various AWS services through the AWS CLI and Python SDK. The tasks are divided into two main sections: Block Storage and Object Storage. Each section includes detailed steps, commands, and scripts required to accomplish the tasks.
These files contain the help command outputs for various AWS services and commands:
- command-aws.txt: Help command for AWS CLI.
- commands-aws-ec2.txt: Help command for EC2 service.
- commands-aws-ec2-run-instances.txt: Help command for EC2's run-instances command.
- commands-aws-iam.txt: Help command for IAM service.
- commands-aws-iam-get-policy.txt: Help command for IAM's get-policy command.
- commands-aws-iam-list-policies.txt: Help command for IAM's list-policies command.
- commands-aws-s3api.txt: Help command for S3 API service.
- commands-aws-s3api-create-bucket.txt: Help command for S3 API's create-bucket command.
- Storage Tasks - all executed commands.txt: Contains all the CLI commands executed to perform the tasks.
- my-s3-python.py: Python code to access a file in S3 storage using Flask.
- my-s3-file.txt: Text file used by the Python code.
- policy-s3.json: JSON file to create an IAM policy.
- tags-instance.json: JSON file to create tags for EC2 instances.
- tags-routetable.json: JSON file to create tags for route tables.
- tags-subnet.json: JSON file to create tags for subnets.
- tags-volume.json: JSON file to create tags for volumes.
- tags-vpc.json: JSON file to create tags for VPCs.
- Storage-Documentation.docx: Documentation of all the commands executed and their screenshots.
- Storage-Documentation.pdf: PDF format of the documentation.
- Sample-key-pair.pem: Sample RSA key for access to EC2 resources of AWS.
- Download and install the AWS CLI.
- Create a public subnet in a VPC.
- Create an EC2 instance with a public IP address.
- Check available storage types for block volumes.
- Create a 10 GB block storage volume (Standard/Magnetic).
- Attach the block storage volume to the EC2 instance.
- Modify the volume to 25 GB or higher (SSD).
- Attempt to delete the volume.
- Delete the EC2 instance and any attached block storage volumes.
- Document each step with screenshots and commands in
Storage-Documentation.docx
.
- Create an IAM policy for object storage bucket management.
- Create an object storage bucket.
- List the created buckets.
- Create a text file with "Hello Object Storage".
- Copy the text file to the bucket.
- List the objects in the bucket.
- Create an EC2 instance.
- Write a Python Flask program to read the text file from the bucket and return it in an HTTP response.
- Delete the file, the bucket, and the EC2 instance.
- Document each step with screenshots and commands in
Storage-Documentation.docx
.
To execute the commands provided in this repository, you need to have the AWS CLI installed and configured.
-
Install AWS CLI: Follow the installation guide from the AWS CLI official documentation.
-
Configure AWS CLI:
aws configure
You will need to provide your AWS Access Key, Secret Key, default region, and output format.
To run the Python Flask application, you need to have Python and the required libraries installed.
- Install Python: Ensure you have Python 3.6 or later installed. You can download it from the official Python website.
- Create a
requirements.txt
file with the following content:Flask boto3
- Create a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install Required Libraries:
pip install -r requirements.txt
-
Clone the repository:
git clone https://github.com/yourusername/Roadmap-to-AWS-Cloud-Engineer.git cd Roadmap-to-AWS-Cloud-Engineer
-
Execute the commands: Follow the commands in
Storage Tasks - all executed commands.txt
to set up your AWS environment. -
Run the Python Flask app:
python my-s3-python.py
-
View the Flask app: Open your browser and navigate to
http://localhost:5000/hello
to see the content from the S3 bucket.
This project is licensed under the MIT License - see the LICENSE file for details.
Special thanks to the AWS documentation and community for providing comprehensive guides and examples.
Feel free to explore the repository and use it as a guide to enhance your skills in managing AWS services through the CLI and Python SDK. If you have any questions or suggestions, please open an issue or submit a pull request.