Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patheard/aws-js-s3-explorer-oauth
AWS S3 explorer using Cognito and Lambda@Edge to restrict access
https://github.com/patheard/aws-js-s3-explorer-oauth
cognito lambda-at-edge terraform
Last synced: about 2 months ago
JSON representation
AWS S3 explorer using Cognito and Lambda@Edge to restrict access
- Host: GitHub
- URL: https://github.com/patheard/aws-js-s3-explorer-oauth
- Owner: patheard
- Created: 2024-02-21T03:59:24.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-26T18:09:57.000Z (10 months ago)
- Last Synced: 2024-02-26T19:28:03.738Z (10 months ago)
- Topics: cognito, lambda-at-edge, terraform
- Language: JavaScript
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS JS S3 Explorer + Cognito@Edge :telescope: :closed_lock_with_key:
This is an example of how to use [AWS JS S3 Explorer](https://github.com/awslabs/aws-js-s3-explorer/tree/v2-alpha) with [Cognito@Edge](https://github.com/awslabs/cognito-at-edge) and [Google OAuth](https://github.com/jetbrains-infra/terraform-aws-cognito-google-oauth-with-custom-domain). It does the following:
1. Creates a static website in S3 with a custom domain using CloudFront.
2. Uses Cognito@Edge to authenticate users with Google OAuth before they can access the site.## Setup
1. Run the devcontainer.
1. Create [Google OAuth client credentials](https://repost.aws/knowledge-center/cognito-google-social-identity-provider).
1. Add a `.tfvars` file with the following variables:
```hcl
domain = "your-domain.ca"
google_client_id = "your-client-id"
google_client_secret = "your-client-secret"
```
1. Run:
```sh
npm install --prefix ./terraform/aws/cognito-at-edge
terraform -chdir=./terraform/aws apply
```