Serverless — REST, GraphQL, and AppSync
Develop serverless APIs using REST, GraphQL, and AWS AppSync.
We developed a serverless backend service to download the stock countries and stocks. The data is stored in the DynamoDB tables. For applications to access the data, normally we will use APIs.
In this article, we are going to explore using REST, GraphQL, and the AWS AppSync service to access the stock information.
This article is part of the Serverless for Beginners series.
The source code can be found in this repository.
Getting Started
We use Serverless Stack to develop our application on AWS. In the previous article, we use the SST Cron Jobs to create a backend service to scrape stock information. Internally the cron job uses an EventBridge rule that triggers a Lambda function based on the defined schedule. We develop the Lambda function using Python as we want to use the investpy
library.
For the APIs, let’s use Typescript for our project. We can create a Typescript-based project using the following command.
npx create-serverless-stack@latest --language typescript --use-yarn alpha2phi
- We specify the language to be Typescript.