Serverless — REST, GraphQL, and AppSync

Develop serverless APIs using REST, GraphQL, and AWS AppSync.

alpha2phi
7 min readMar 22, 2022
Serverless — REST, GraphQL, and 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.

--

--

alpha2phi
alpha2phi

Written by alpha2phi

Software engineer, Data Science and ML practitioner.

No responses yet