AWS, Cloud Computing

3 Mins Read

Introduction to Boto3 and AWS Credentials Setup on Windows 10

Voiced by Amazon Polly

1. Introduction to Boto

Boto is a software development kit of the Python SDK for AWS. It allows you to create, update, and delete AWS resources directly from your Python scripts. Boto versions include Boto, Boto3, and Botocore.

The SDK comprises two essential Python packages: Botocore (the library providing the low-level functionality shared between the Python SDK and the AWS CLI) and Boto3 (the package implementing the Python SDK itself).

I hope that you have prior experience with AWS, have your account, and want to upskill by starting to use AWS tools and services using Python.

  • Client: low-level service access
  • Resource: higher-level object-oriented service access

You can use either to interact with S3.

Let us now deep-dive into step by step guide to set up Boto3.

Customized Cloud Solutions to Drive your Business Success

  • Cloud Migration
  • Devops
  • AIML & IoT
Know More

2. Step-by-Step Guide to setup Boto3 and AWS credentials on your Windows 10:

  • To begin with, you need Python in your system.
  • Go to python.org and download the version of Python required.
  • Set paths for Python and pip3.

Once Python is installed, you will need Boto3.

  • Go to the command prompt and type “pip3 install boto3“.
  • Now you need to install the AWS command-line interface.
  • Go to the command prompt and type “pip3 install awscli“.
  • To check if you have aws CLI installed, type “aws –version

Next, you need the AWS access key.

  • Go to AWS Console. Click on the top right corner to use your profile and “My security credentials.”
    Boto3
  • Next, click on the Access keys.
    Boto3
  • Click on create a new access key.
    Boto3
  • Click on the download key file
    Boto3
  • Now you have the access key id and secret key downloaded. The next step is to configure AWS credentials
  • Go to the command prompt, and type “aws configure.” It will ask for the access key id and secret key
  • Once entered, it will ask for the default region (if you don’t mention the default region of your choice, it will take us-east-1 as the default region)
  • Next, you must mention the default output format (ex: json)
  • To check if credentials are configured or not, go to This PC
  • Go to your operating system’s location (usually: local drive c). Then, go to users and click on current users
  • Now you need to open “.aws” under which you will have a credentials folder where you can see your aws credentials
  • If you want to check for the credentials through the command line, follow:>> cd .aws>> dir>>type credentials
  • This creates a default profile

To create a profile of your choice, you can add a new user and create one

  • To add a new user with a different profile, create a new IAM user in the aws console.
  • If you try to configure the new IAM user credentials using the command line, it will overwrite the root user credentials
  • So to configure the new IAM user, type “aws configure –profile new_user-name
  • You will again be asked for the access key id and secret key. Again, copy pastes them from AWS Console
  • Next, enter the default region and default output type
  • Now, check for credentials through the command line.>>dir>type credentials
  • You can see both the credentials
  • You can also check for credentials in your system where your operating system is installed (usually: local c drive)
  • You have your boto3 set up done. Now you can use AWS services with Python

3. Conclusion

At its core, all that Boto3 does is call AWS APIs on your behalf. For the majority of the AWS services, Boto3 offers two distinct ways of accessing these abstracted APIs:

Boto3 is the latest version of the SDK and supports Python versions 2.6.5, 2.7, and 3.3. In addition, it includes some service-specific features to facilitate development. It is an Amazon Web Services (AWS) Software Development Kit (SDK) for Python that allows Python developers to create software that uses Amazon S3 and Amazon EC2.

Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.

  • Cloud Training
  • Customized Training
  • Experiential Learning
Read More

About CloudThat

CloudThat is an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.

FAQs

1. What do we use boto3 for?

ANS: – Boto3 is the name of the Python SDK for AWS. It will help you to interact with AWS services from your Python scripts.

2. What is Botocore?

ANS: – Botocore is a low-level interface for many Amazon Web Services. Both AWS CLI and Boto3 are built on top of it. From sending an API request to AWS and receiving a response, everything needed is taken care of by Botocore.

WRITTEN BY Sonam Kumari

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!