Skip to content

leonelgalan/cdk-unauthenticated-demo

Repository files navigation

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.