A serverless application built with AWS Lambda for managing D&D campaigns and user authentication.
NAT20 is a serverless application that provides authentication and campaign management functionality for D&D players and Dungeon Masters. Built using AWS Lambda, Cognito, and API Gateway.
- Runtime: Node.js 20.x
- Region: us-east-1
- Memory: 1024MB
- Timeout: 30 seconds
POST /users
- Create new user accountPOST /login
- Sign in userPOST /logout
- Sign out userGET /current_user
- Get current active user
POST /campaigns
- Create new campaignGET /campaigns/{id}
- Get specific campaignGET /campaigns
- Get all DM's campaigns
USER_POOL_ID
USER_POOL_CLIENT_ID
IDENTITY_POOL_ID
verification_method
DB_NAME
DB_HOST
DB_PORT
DB_USER
DB_PASSWORD
aws_account_id
The service requires the following Cognito permissions:
- cognito-idp:AdminInitiateAuth
- cognito-idp:AdminCreateUser
- cognito-idp:AdminConfirmSignUp
- cognito-idp:AdminSetUserPassword
- cognito-idp:AdminGetUser
- cognito-idp:AdminUpdateUserAttributes
All endpoints have CORS enabled with:
- Origin: *
- Max Age: 86400 seconds
The service uses serverless framework for deployment. Deploy using:
serverless deploy
- Individual packaging: disabled
- Excludes all files by default except:
- src directory
- .env file
- Organization: 12jikan
- Service Name: nat20