A simple Demo app to connect to AWS S3 to upload and list files.
In order to run this app you will first need:
- An Amazon AWS account. A Identity and Access Management (IAM) user with Amazon S3 permission (e.g. AmazonS3FullAccess)
- An S3 bucket already created.
- Python 3 and the Flask framework
-
Ensure you create the following files for your AWS Credentials:
~/.aws/credentials
and~/.aws/config
. -
In your ~/.aws/credentials file you should have the following:
[default] aws_access_key_id = YOUR_ACCESS_KEY aws_secret_access_key = YOUR_SECRET_KEY
-
You may also want to set a default region. This can be done in the configuration file. By default, its location is at
~/.aws/config
:[default] region=us-east-1
-
Create Python Virtual environment:
python -m venv venv
-
Activate Python Virtual environment
source venv/bin/activate
-
Install application requirements:
pip install -r requirements.txt
-
Start application development server:
python app.py
-
Browse to http://localhost:8080