This project is a quick way to get a serverless API providing user authentication using Cognito.
For a quick introduction into what is AWS Sam, please go here. For a quick introduction into what is AWS Cognito, please go here.
I will be building on top of this and adding more as I progress into more functionalities. For a full walkthrough of how I've been doing this, you can follow me on Medium or simple start with the first post on the Creating a Serverless authentication API
To run the project there's a few required tools:
First tool that needs installing is the AWS CLI. You can use the Install link for MacOS. Once the Cli has been installed, you'll need to configure your cli. To do so, open the AWS console with your user:
- Go to IAM
- Once in the IAM console, find your user and go to Security Credentials
- If you have an existing access key, you should have both the access key and a secret
- If you don't have one, create it on the console
Once you have a key and a secret to connect the CLI with your account go to a command prompt and use
aws configure
Once you've run this command, follow the instructions.
To be able to run the Api for local testing you will need to install docker in your Mac. To do so, you'll need to download it from here
Our API runs as a serverless project, which means you'll need the AWS SAM Cli for running the project. You can follow the official guide for installing it on MacOS
It's also worth having a read on the docs generated by AWS sam on the creation of a project.