Skip to content

A basic example of a lambda with AWS Cognito authentication and Sam Deployment process

License

Notifications You must be signed in to change notification settings

ngandon/lambda-cognito-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supporting codebase for blog tutorial

Visit Here to view the associated blog content.

To run

  • Set the following environment variables
    • STACK_NAME
    • STACK_BUCKET (this bucket must exist in your AWS environment)
    • YOUR_EMAIL (The template will create a user at this email and send you a temp password)
  • run make deploy
  • run ./scripts/login_first.sh {{User Pool ID}} {{User Pool Client ID}} {{Your Email}} {{Temp password that was sent to you}}
    • Get the first two values from the cloudformation outputs dashboard
  • run curl {{Url to your api}}/open
    • Will work before logging in
  • run curl -H "Authorization: {{Auth Token from script above}}" {{Url to your api}}
    • Will only work if you add the Authorization Header

PRs and suggestions are welcome.

About

A basic example of a lambda with AWS Cognito authentication and Sam Deployment process

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 49.2%
  • Go 33.1%
  • Shell 17.7%