https://github.com/josgard94/cognitolab
This repository content a template for cloudForm, that allow build the following services: s3 bucket, api gateway and cognito user pool. In another hand, this template show a example the how to use a authorization based an token genereted by cognito
https://github.com/josgard94/cognitolab
awe-cognito-service aws aws-apigateway aws-cloudformation aws-cloudformation-templates aws-iam-roles aws-lambda aws-s3 aws-serverless aws-services
Last synced: about 1 month ago
JSON representation
This repository content a template for cloudForm, that allow build the following services: s3 bucket, api gateway and cognito user pool. In another hand, this template show a example the how to use a authorization based an token genereted by cognito
- Host: GitHub
- URL: https://github.com/josgard94/cognitolab
- Owner: josgard94
- License: gpl-3.0
- Created: 2022-10-03T06:51:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-19T07:20:32.000Z (over 3 years ago)
- Last Synced: 2025-01-21T21:35:04.486Z (over 1 year ago)
- Topics: awe-cognito-service, aws, aws-apigateway, aws-cloudformation, aws-cloudformation-templates, aws-iam-roles, aws-lambda, aws-s3, aws-serverless, aws-services
- Language: JavaScript
- Homepage:
- Size: 167 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cognitolab
This repository contains a CloudFormation template that allows you to deploy the following AWS services:
- **Amazon S3 Bucket**
- **Amazon API Gateway**
- **Amazon Cognito User Pool**
It also includes an example demonstrating how to secure an API using token-based authorization powered by Amazon Cognito.
## 🚀 Features
- Automated infrastructure deployment with CloudFormation
- Seamless integration between Cognito and API Gateway
- Token-based authentication using JWTs
- Serverless Framework configuration
## 🧰 Technologies Used
- AWS CloudFormation
- AWS API Gateway
- AWS Cognito
- AWS Lambda
- Serverless Framework
- Node.js / Python
## 📦 Project Structure
```
├── common/ # Shared resources (IAM roles, policies, etc.)
├── resources/ # CloudFormation resource definitions
├── scripts/ # Helper scripts
├── services/ # Lambda function code
├── serverless.yml # Serverless Framework configuration
├── package.json # Project dependencies
└── README.md # This file
```
## 🔧 Prerequisites
- An AWS account with necessary permissions
- Node.js >= 14.x
- [Serverless Framework](https://www.serverless.com/framework/docs/getting-started) installed globally
```bash
npm install -g serverless
```
1. 🚀 Deployment
```
Install dependencies:
```
2. Deploy the stack using Serverless:
```
sls deploy
```
3. After deployment, you will receive the API Gateway endpoint URL protected by Cognito.
## 🔐 Authentication
This project uses Amazon Cognito for authentication and API protection. To access protected endpoints:
1. Register a new user in the Cognito User Pool.
2. Authenticate the user and retrieve a JWT token.
3. Use the token in the Authorization header when making requests to the API.
## ⭐ Like this project?
Star it if you found it useful ⭐ and feel free to contribute!