Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Simple Photo Gallery application using AWS JavaScript SDK for front-end, Cognito Identity for Authentication, S3 Service to store photos

License

Notifications You must be signed in to change notification settings

sarath196/Funny-Photot-Gallery-AWS-JavaScriptSDK-S3-Cognito

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Funny-Photot-Gallery-AWS-JavaScript-SDK-Cognito-Auth-Access-S3-Bucket

Simple Photo Gallery application using AWS JavaScript SDK for front-end, Cognito Identity for Authentication, S3 Service to store photos

Demo webpage link: http://gallerywebhosting.s3-website-us-east-1.amazonaws.com/

Cognito JS SDK Authentication reference documentation: https://aws.amazon.com/blogs/mobile/accessing-your-user-pools-using-the-amazon-cognito-identity-sdk-for-javascript/

AWS resource access from browser SDK reference documentation: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/getting-started-browser.html

Figure 1: conito1

Figure 2: cognito2

Figure 3: Cognito3

Bucket Policy for mediagallerys3 s3 bucket:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "DelegateS3Access",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::<your account id>:root"
            },
            "Action": [
                "s3:ListBucket",
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::mediagallerys3/*",
                "arn:aws:s3:::mediagallerys3"
            ]
        }
    ]
}

CORS Configuration for mediagallerys3 bucket:

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

About

Simple Photo Gallery application using AWS JavaScript SDK for front-end, Cognito Identity for Authentication, S3 Service to store photos

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.