Store weather data in Amazon S3

In this article, we will look at how to store JSON data in an Amazon S3 bucket. Technologies & Tools Python - Run time environment AWS Account (Free Tier) Boto3 - AWS SDK for python python-dotenv - to load environment variables from .env files. requests - a simple HTTPS library Openweather API - external api that provides real time weather data Github Repo (Optional) - a version control for your code Pre-requisite Setup Python if you haven't, please setup Python on you local machine. [Optional] Github Account & Repo Skip this if you don't intend to save your project on github. However, you can follow these links to setup a Github Account & Repo. Setup AWS account and IAM User Create you AWS Free Tier account if you haven't. Then, follow these steps to create your IAM user. Ensure the IAM user is assigned the AmazonS3FullAccess policy. Setup AWS CLI We are going to be using the Boto3 AWS SDK to interact with AWS. Underneath, the AWS uses a AWS API KEY and secret key to authenticate with AWS. Hence we need to configure AWS credentials on our local machine. Please follow the Boto3 documentation for configuration guide. Ensure the IAM user credentials you're using is configured with the AmazonS3FullAccess policy mentioned above. OpenWeather API Openweather is the external api that we will use in this project to provide real time weather data. Please sign up to OpenWeather service to get your OpenWeather API key. Now let's get started!

Jan 23, 2025 - 03:47
 0
Store weather data in Amazon S3

In this article, we will look at how to store JSON data in an Amazon S3 bucket.

Technologies & Tools

Pre-requisite

Setup Python

if you haven't, please setup Python on you local machine.

[Optional] Github Account & Repo

Skip this if you don't intend to save your project on github. However, you can follow these links to setup a Github Account & Repo.

Setup AWS account and IAM User

Create you AWS Free Tier account if you haven't. Then, follow these steps to create your IAM user. Ensure the IAM user is assigned the AmazonS3FullAccess policy.

IAM-AmazonS3FullAccess

Setup AWS CLI

We are going to be using the Boto3 AWS SDK to interact with AWS. Underneath, the AWS uses a AWS API KEY and secret key to authenticate with AWS. Hence we need to configure AWS credentials on our local machine. Please follow the Boto3 documentation for configuration guide. Ensure the IAM user credentials you're using is configured with the AmazonS3FullAccess policy mentioned above.

OpenWeather API

Openweather is the external api that we will use in this project to provide real time weather data. Please sign up to OpenWeather service to get your OpenWeather API key.

Openweather-api-key

Now let's get started!

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow