Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

API Stack

This is a AWS CDK stack definition.

It is designed as simple, extremely cheap to host, but highly scalable API that can be used as a starting point for building your own API.

Features

  • 🌐 AWS API Gateway
  • 🚀 Individual AWS Lambda endpoints (TypeScript)
  • 📖 Self-documented with OpenAPI 3.0 spec generated by the API Gateway itself
  • 🔒 Custom Hosted Zone with SSL certificate
  • 🔑 SSO Authorization using AWS Cognito as a shared Auth service
  • 📦 Deployed as a cweb.pkg component via Management API

Local Development

Prerequisites

Setup

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run npm test to run the tests
  4. Run npm run lint to fix any linting issues

Deployment

Use package workflows to deploy through Connected Web Management API:

Environments

This stack is designed to be deployed to multiple environments. The following environments are supported:

  • connected-web-dev - Development environment
  • connected-web-prod - Production environment

These environments are preconfigured with a Hosted Zone and SSL certificate and AWS Cognito user pools.

Authentication

This stack uses AWS Cognito shared authentication only.

The synthesized template declares deploy-time CloudFormation parameters for shared authorizer wiring:

  • IDENTITY_AUTHORIZER_ARN

The template also expects deploy-time domain parameters:

  • Subdomain
  • HostedZoneDomain
  • HostedZoneId

In package-based deployment these values are passed or injected by Management API during deployment.