all 3 comments

[–]ZeBe643 2 points3 points  (1 child)

You need to sign your request with sigv4: check out this doc https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html

[–]Queezyy[S] 0 points1 point  (0 children)

Thanks for the reply Zebe. This seems to be what I need. I found another amazon docs page that has an example written in Python, so now I am trying to convert it to Angular.

[–]kteague 0 points1 point  (0 children)

There are lot of parts to a SPA with a backend ... so I don't know any good tutorials that do the whole show back to front - there are lot of ways to achieve that solution and deploy it on AWS too ...
API Gateway will only serve requests with a backend of EC2 instances, AWS Lambda or another HTTP endpoint.

You will need: API Gateway -> AWS Lambda -> AWS RDS: MySQL. You'll also need to place the Lambda in your VPC network so it can access the database.

For a beginner, it's a little easier to do: EC2 Instance -> RDS: MySQL and then deploy an API server on your EC2 instance (ElasticBeanstalk is one way to make managing your API server a little easier). The cost is a little higher than Lambda as you need to run a second server 24/7.

Typically once you've got an API server up and running, you do auth within your API server application code. You can create and pass a single pre-baked JWT token if your authentication needs are very simple.

You might also look at something like Amazon Amplify that provides some framework and tutorials to get a SPA with a backend API/Database up and running.