Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 20, 2021 04:42 pm GMT

Challenge 1: Create a simple app in Lambda DynamoDB Serverless Framework

About the challenge

A few of my developer friends and colleagues at work asked me how they can learn more about AWS. I told them that the best way to learn is:

  • To do hands-on experience
  • Learn something that has close parallels to what you're doing
  • Solve a well-defined problem that you have to research the answer for instead of handing it to you.

Hence, the serverless challenge was born. The challenge is best suited for people who have some experience in development but have not necessarily touched up on the latest trend of serverless computing.

Situation

You are the dev lead (aka 'the only dev') of a chain of restaurants. To increase sales, your boss wants you to create a simple loyalty application. He has heard of the Serverless Framework and how it allows your team to use serverless technologies like Lambda to deploy your application. Your boss is particularly sensitive to cost. Since Lambda only charges you when the code is run (when someone uses your app), your boss is thrilled to introduce the technology.

Specifications

Create 3 Lambda functions for each endpoint:

  • POST /loyalty-cards: create a loyalty card
  • GET /loyalty-cards/10: display the loyalty card you just created using the id
  • GET /loyalty-cards: display all loyalty cards

You must follow the guidelines below:

  • The Lambda function must be deployed using the Serverless Framework (SF). SF is a tool that makes deploying Lambda functions easier. You no longer have to package dependencies and upload code to Lambda manually. All you need to do is run "serverless deploy".
  • Your data must persist, and your database must be DynamoDB. DynamoDB is a NoSQL database service by AWS. Unlike traditional relational databases, DynamoDB does not maintain a schema. Except for the primary key attributes (which have to be unique for each record), you can add different attributes for different items in the table.

Resources

The resources here will certainly help you get started with this challenge. But it won't be the only ones you'll use. You will have to research some answers.

Set up your AWS CLI

Serverless in AWS

Show off your work!

Comment a screencap of your work below. Or better yet, create a blog post here in dev.to explaining how you did it.

If you have any questions or are stuck somewhere, comment below or send me a pm, and I'd be happy to help you.

Photo by Avi Richards on Unsplash


Original Link: https://dev.to/raphael_jambalos/challenge-1-create-a-simple-app-in-lambda-dynamodb-serverless-framework-of6

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To