Coder Social home page Coder Social logo

heerdt / serverless-s3-uploader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/serverless-s3-uploader

0.0 1.0 0.0 10 KB

AWS Serverless Application Repo example for serverless uploading to S3.

License: MIT No Attribution

JavaScript 100.00%

serverless-s3-uploader's Introduction

Serverless S3 Uploader

The Serverless S3 Uploader allows you to upload JPG files to Amazon S3 buckets from your web applications using pre-signed URLs.

Important: this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the AWS pricing page for details.

.
├── README.MD                   <-- This instructions file
├── s3UploaderFunction          <-- Source code for the main lambda function
│   └── app.js                  <-- Main Lambda handler
│   └── testHarness.js          <-- For testing code locally
│   └── package.json            <-- NodeJS dependencies and scripts
├── template.yaml               <-- SAM template

See this YouTube video walkthrough of how uploading to S3 works with presigned URLs.

Requirements

If using outside of the AWS Serverless Application Repository:

Installation Instructions

  1. Create an AWS account if you do not already have one and login.
  2. Go to the app's page on the Serverless Application Repository and click "Deploy"

Using this Application

  • This application creates an API Gateway endpoint where your application can request a pre-signed URL to upload JPG objects to an S3 bucket. Once the API returns the URL, your application can PUT the object data to this URL to complete the upload.
  • This application is for educational purposes and does not provide any throttling on the API Gateway endpoint. For production usage, you should apply throttling to your API resources.
  • You can modify this application to upload other types of object.

How it works

  • Deploy this serverless application and take a note of the API endpoint.
  • Invoke the API to receive a pre-signed URL for uploading a JPG file. Use this pre-signed URL to complete the upload.
  • For a live example of this, see this Fiddle. View the browser console to see logs of how the Fiddle is interacting with the API Gateway and presigned URL.

==============================================

Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: MIT-0

serverless-s3-uploader's People

Contributors

jbesw avatar amazon-auto avatar heerdt avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.