leonelgalan / cdk-unauthenticated-demo

A `LambdaRestApi` with unauthenticated access.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stack

  • An Identity Pool with "Allow unauthenticated identities"
  • An Unauthenticated role, to be assumed by unauthenticated identities.
  • A LambdaRestAPI with a single ANY method on root authorized by IAM.
  • A Policy that allows Unauthenticated to execute that single endpoint.

Tooling

Setup

npm install
cdk bootstrap
npm run deploy
npm run client

Notes

  • npm run deploy instead of cdk deploy to run the "postdeploy" script. This will read the outputs and write them into the .env file.
  • The client is a demo on how to retrieve the identity and credentials to call the API.

About

A `LambdaRestApi` with unauthenticated access.


Languages

Language:TypeScript 94.6%Language:JavaScript 5.4%