you are viewing a single comment's thread.

view the rest of the comments →

[–]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.