How to read file from S3 bucket using boto3?

You can use the below script to read the content of a file from S3 bucket using boto3 and print the output to the command line.

Step 1: Install and configure boto3

Step 2: Create a script to print the content of an S3 object in the command line

Step 3: Execute the script to print a file contents hosted in an S3 bucket