In this webinar, I have tried to explain AWS CLI and the need of AWS SDK i.e. Boto3, a Python library to write useful scripts from listing a resource to creating, deleting, updating any resources, etc. Also, you might be interested in my other webinar on How to start a career in Cybersecurity as well
So, What I covered in Python for AWS webinar
- I tried to convey the message that how much Python basics you should already know
- Basic familiarity with AWS services would help you to understand the examples better
- I tried to cover a few basics of AWS-CLI, its setup, aws cli command structure, and some useful aws examples.
- Added one quick slide on aws-shell. I have also explained about aws-shell on youtube.
- Then I tried to explain the need for Boto3 and its setup in local machine
- Boto3 setup and verification was very quick and easy actually
So now, before moving further I would explain 2 below main questions regarding boto3
What is Boto3
Let’s say you want to automate a few things in AWS like creating an EC2 instance, Creating S3 bucket or listing all the files of a specific bucket or uploading files from local machine to S3 bucket, Getting details of an IAM user and so on. And you want to achieve this using your favorite programming language Python ;).
How would you do that? Well, the answer is Boto3.
So here is the official statement regarding Boto3. Boto3 is the Amazon Web Services (AWS) SDK for Python. It enables Python developers to create, configure, and manage AWS services, such as EC2 and S3. Boto3 provides an easy to use, object-oriented API, as well as low-level access to AWS services.
Boto3 is built on the top of a library called Botocore, which is shared by the AWS CLI. Botocore provides low-level clients, sessions and credentials, and configuration data. Boto3 built on the top of Botocore by providing its own session, resources, and collections.
Why Boto3 or Python for AWS
Boto3 Official documentation makes it even easier to work on AWS services.
What I explained quickly through Webinar
I have explained in video to setup and install using pip or pip3
- Awscli :
pip3 install awscli
Boto3: pip3 install boto3
- Configuring your AWS environment in local machine using
More documentation on Boto and AWSCLI
Once, all set up and tested that everything is working as expected, I tried to show few real-world but easy to follow examples like:
- An example of a security group that how it would be useful for security assessment.
- Finding orphan security group
- Creating S3 bucket and uploading file into it
- Get IAM account details
- EC2 instance details region wise
- Security groups attached with EC2
- Fetch public IPs of ELBs
We also explained what we can achieve next by learning the basics of python and boto3. We can do lots of things like AWS Security assessment or even Security Automation. You can even command-line tools using boto3 and click module.
It’s really fun to send SMS using SNS through the command line like
aws sns publish --phone-number +961896XXXX --message 'Hey there, I am using SNS.‘
Well that’s it for now. It was just an overview of what I covered in a webinar on Python for AWS. Below are the details of recorded video and presentation.
Here is the recorded webinar on Youtube
Also, I am sharing the presentation on Python for AWS here for quick read
I hope you will enjoy reading the blog and watching the video. Please like, subscribe, and don’t forget to share your thoughts through comments. Happy Learning
He is a seasoned professional having 10+ years of experience into Software Development, Python, AWS, Application Security and have an interest in Security Automation.
He is an author and technical reviewers of many technical books associated with PackT and Manning. When he gets free time, he uses to work on his github projects which you can checkout here: Sanjeev’s Git hub repo