All Projects → keithweaver → Python Aws S3

keithweaver / Python Aws S3

Demo of AWS S3 Walkthrough using Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Python Aws S3

Workshop Donkeytracker
Workshop to build a serverless tracking application for your mobile device with an AWS backend
Stars: ✭ 27 (-84.02%)
Mutual labels:  aws, s3, amazon-web-services
Aws Sdk Perl
A community AWS SDK for Perl Programmers
Stars: ✭ 153 (-9.47%)
Mutual labels:  aws, s3, amazon-web-services
Cloud Security Audit
A command line security audit tool for Amazon Web Services
Stars: ✭ 68 (-59.76%)
Mutual labels:  aws, s3, amazon-web-services
Terraform Aws Cloudfront S3 Cdn
Terraform module to easily provision CloudFront CDN backed by an S3 origin
Stars: ✭ 162 (-4.14%)
Mutual labels:  aws, s3
Aws Appsync Rds Aurora Sample
An AWS AppSync Serverless resolver for the Amazon Aurora relational database.
Stars: ✭ 122 (-27.81%)
Mutual labels:  aws, amazon-web-services
Cash
HTTP response caching for Koa. Supports Redis, in-memory store, and more!
Stars: ✭ 122 (-27.81%)
Mutual labels:  aws, s3
Website
⚡️ Instantly deploy static website on serverless infrastructure with zero configuration using Serverless Components.
Stars: ✭ 118 (-30.18%)
Mutual labels:  aws, s3
Code2
Code of Amazon Web Services in Action, Second Edition
Stars: ✭ 138 (-18.34%)
Mutual labels:  aws, amazon-web-services
Terraform Aws S3 Bucket
Terraform module which creates S3 bucket resources on AWS
Stars: ✭ 130 (-23.08%)
Mutual labels:  aws, s3
Docker S3 Volume
Docker container with a data volume from s3.
Stars: ✭ 166 (-1.78%)
Mutual labels:  aws, s3
0x4447 product s3 email
📫 A serverless email server on AWS using S3 and SES
Stars: ✭ 2,905 (+1618.93%)
Mutual labels:  aws, s3
Deploy Strapi On Aws
Deploying a Strapi API on AWS (EC2 & RDS & S3)
Stars: ✭ 121 (-28.4%)
Mutual labels:  aws, s3
Node Acme Lambda
Use AWS Lambda to manage SSL certificates for ACME providers like Let's Encrypt.
Stars: ✭ 120 (-28.99%)
Mutual labels:  aws, s3
Serverless S3 Sync
A plugin to sync local directories and S3 prefixes for Serverless Framework ⚡️
Stars: ✭ 126 (-25.44%)
Mutual labels:  aws, s3
Serverless Architectures Aws
The code repository for the Serverless Architectures on AWS book
Stars: ✭ 120 (-28.99%)
Mutual labels:  aws, s3
Amazon Transcribe Websocket Static
A static site demonstrating real-time audio transcription via Amazon Transcribe over a WebSocket.
Stars: ✭ 136 (-19.53%)
Mutual labels:  aws, amazon-web-services
Aws Csa Pro 2019
AWS Certified Solution Architect Professional (SAP-C01)
Stars: ✭ 143 (-15.38%)
Mutual labels:  aws, amazon-web-services
Cognito Express
Authenticates API requests on a Node application by verifying the JWT signature of AccessToken or IDToken generated by Amazon Cognito.
Stars: ✭ 165 (-2.37%)
Mutual labels:  aws, amazon-web-services
Amazon Guardduty Hands On
This repo can be used to quickly get hands on experience with Amazon GuardDuty by guiding you through enabling the detector, generating a variety of findings, and remediating those findings with Lambda functions.
Stars: ✭ 115 (-31.95%)
Mutual labels:  aws, amazon-web-services
Aws Lambda Blog
AWS Lambda serverless blogging platform
Stars: ✭ 119 (-29.59%)
Mutual labels:  aws, s3

python-aws-s3

About

This is a demo of setting up an Amazon Web Service (AWS) S3 bucket and uploading a file with Python.

Setting Up Bucket

Open AWS Console and log in.

alt text

Click the Services dropdown and select the S3 service.

alt text

alt text

Click Create Bucket. Give it a name, region then hit next through each step.

alt text

alt text

alt text

alt text

alt text

Now click your new bucket

alt text

Upload a test image to your bucket

alt text

alt text

alt text

alt text

You can find your new file. If you click it, you should see a link. Open the link in a new tab.

alt text

As you can see, you'll get "Access Denied".

alt text

Click the file, and under "more" press make public. Refresh the link.

alt text

alt text

alt text

Now click Services then go to IAM dashboard.

alt text

You should see your IAM dashboard. On the left menu, you can click Users.

alt text

alt text

Click the Add User.

alt text

alt text

alt text

alt text

alt text

Now click your new user from the list of users.

alt text

Copy the User ARN

alt text

Reopen the S3 dashboard

alt text

alt text

Now click the permissions tab.

alt text

Then click Bucket Policy.

alt text

alt text

Set your Bucket Policy to be the same as below. Change arn:aws:iam::281979644754:user/sample-user to be your User ARN. Also change arn:aws:s3:::img-bucket-00123 to your Bucket ARN. The bucket ARN is above the textarea.

{
    "Version": "2012-10-17",
    "Id": "Policy1488494182833",
    "Statement": [
        {
            "Sid": "Stmt1488493308547",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::281979644754:user/sample-user"
            },
            "Action": [
                "s3:ListBucket",
                "s3:ListBucketVersions",
                "s3:GetBucketLocation",
                "s3:Get*",
                "s3:Put*"
            ],
            "Resource": "arn:aws:s3:::img-bucket-00123"
        }
    ]
}

Click CORS configuration and add the following policy:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedMethod>PUT</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
    <AllowedHeader>Authorization</AllowedHeader>
  </CORSRule>
</CORSConfiguration>

Reopen the IAM dashboard.

alt text

Open your new user.

alt text

Click on the New inline policy

alt text

alt text

Update the policy to be as follows:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListAllMyBuckets",
                "s3:PutObject",
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::*"
            ]
        }
    ]
}
git clone https://github.com/keithweaver/python-aws-s3.git
cd python-aws-s3
python example.py

alt text

python example-w-folder-create.py

alt text

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].