Giter Club home page Giter Club logo

s3-apigateway-proxy's Introduction

s3-apigateway-proxy

Simplified explaination of AWS tutorial on API gateway as S3 proxy.

structure

  1. /: GET gives list of all buckets
  2. /{folder}: GET PUT DELETE for buckets
  3. /{filder}/{item}: GET PUT DELETE HEAD for items in bucket

steps

  1. Create IAM role for API gateway. Then attach s3fullaccess policy to it.
  2. Add resources and methods as mentioned above.
  3. During creation

integration type: AWS service>s3
HTTP method: PUT GET DELETE(accordingly)
Path override for each method depends on its resource. {folder}/{item} will be mapped to {bucket}/{object}:

1. Resource /: /
2. Resource /{folder}: {bucket} 
3. Resource /{folder}/{item}: {bucket}/{object}
  1. Path mappings

object -> method.request.path.item (only for resource #3)
bucket -> method.request.path.folder (for resource #2 and #3)

  1. Header mappings(resource #2 and #3)
    Most s3 parameters like meta are passed through headers.

x-amz-acl -> 'authenticated-read' Content-Type -> method.request.header.Content-Type

working

Body can have text or binary. URL specifies bucket and object name. To enable binary add / in settings>binary media. If IAM was used to authenticate API then add authorization>AWS signature

https://xn2nuhcvxd.execute-api.us-east-1.amazonaws.com/dev/demobucket/bible.jpeg

s3-apigateway-proxy's People

Contributors

secretshardul avatar

Watchers

 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.