Skip to content

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

License

Notifications You must be signed in to change notification settings

josgard94/cognitolab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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!

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published