[Webinar] Python for AWS

Python for AWS

Posted By : Sanjeev Jaiswal

Added :

1 Comment


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

  1. I tried to convey the message that how much Python basics you should already know
  2. Basic familiarity with AWS services would help you to understand the examples better
  3.  I tried to cover a few basics of AWS-CLI, its setup, aws cli command structure, and some useful aws examples. 
  4. Added one quick slide on aws-shell. I have also explained about aws-shell on youtube.
  5. Then I tried to explain the need for Boto3 and its setup in local machine
  6. Boto3 setup and verification was very quick and easy actually
Python for AWS

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

Well, you can choose any language of your choice like Java, Ruby, Go, or even JavaScript apart from Python. I chose Python because of its nature towards Automation and ease of writing and maintaining code. Also. you would get developers to support in GitHub mostly. 

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

  1. Awscli : pip3 install awscli
  2. Boto3: pip3 install boto3
  3. Configuring your AWS environment in local machine using aws configure

More documentation on Boto and AWSCLI

  1. https://aws.amazon.com/cli/
  2. https://boto3.readthedocs.io/en/latest/

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:

  1. An example of a security group that how it would be useful for security assessment. 
  2. Finding orphan security group
  3. Creating S3 bucket and uploading file into it
  4. Get IAM account details
  5. EC2 instance details region wise
  6. Security groups attached with EC2
  7. 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

0 0 votes
Article Rating
Subscribe
Notify of
guest

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
AWS Training
3 years ago

Thanks for sharing such a pleasant thought, article is fastidious, that’s why I have read it completely.