Giter Club home page Giter Club logo

s3-bucket-browser's Introduction

AWS S3 Bucket Browser

S3 Bucket Browser, fully based on AWS JavaScript API, see http://aws.amazon.com/sdkfornodejs/

Base on the idea of : https://github.com/rgrp/s3-bucket-listing and inspired on the current S3 Browser from Amazon.

Intent for public or private usage, you can deploy this files on any web site.

Not intent for deploy on your own bucket (for me no make sense).

Using the new IAM Users from AWS you can provide more specific and secure access to your buckets.

Usage

Notes I recommend create specific user or roles to access bucket to browse, then generate their access key, for now this code is intent only for browse, then no need to create a user with other privileges just use ListObjects. Check this link http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html

  1. Copy the files on your web site. Could be based on Apache or IIS.

  2. Modify the setting in file js/config.js

    • var AWS_AccessKeyId = ''; //Your credentials for specific user and privileges
    • var AWS_SecretAccessKey = ''; //Your credentials for specific user and privileges
    • var AWS_Region = 'us-east-1';
    • var AWS_BucketName = '';
    • var AWS_MaxKeys = 500; //How many objects will retrive (include folders and items)
    • var AWS_Prefix = ''; //Stating folder, by default start on root of bucket
    • var AWS_SignedUrl_Expires = 900; //This is the default value for expires getSignedUrl (value in seconds, 15 mins set) //Check this parameter in http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getSignedUrl-property
    • var TITLE = 'S3 Bucket browser';

    Notes: You can leave the AccessKeyId and SecretAccessKey as empty strings to avoid exposing AWS credentials publicly. In this case the S3 Bucket Browser will prompt user for credentials via WEB form.

  3. Navigate to index.html and start browsing...

Bucket Configuration

Need to establish this CORS configurations on your bucket to works correctly:

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

Copyright and License

Copyright 2017 Juvenal Guzman.

Contributors

Special thanks to:

Joseph Chereshnovsky (webdevbyjoss) Jouni Kaplas (kaplas)

License

Licensed under the MIT license:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

s3-bucket-browser's People

Contributors

juvs avatar kaplas avatar farsoo 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.