loading...
Cover image for πŸš€ Dictionary API built using Serverless Framework and AWS Lambda Functions

πŸš€ Dictionary API built using Serverless Framework and AWS Lambda Functions

realabbas profile image Ali Abbas ・1 min read

Recently, I was working on a project that required dictionary words and their meanings. I tried to find some good Dictionary APIs. πŸš€

I found some but they were paid one and that too available with a cap value.

So I created my own dictionary API with no request limitations using Serverless Framework Stack with Amazon Web Services (AWS) Lambda and AWS Cloudfront.

AWS Lambda provides 10,00,000 free requests every month and only triggers on a particular event like http request. So it saves alot of computing power and resources.

For those who want to start with Serverless Stack they can see the link of the repository here

Currently the api endpoint takes a word and returns the meaning. I'll try to add more options like synonms and antonyms.

GitHub Contributors are welcome to contribute. Also, you may use the dictionary api for your project.

Posted on May 28 '19 by:

realabbas profile

Ali Abbas

@realabbas

MERN Stack Developer, with the passion to develop apps that can make this world better. "Whenever I get bored, I call API's"

Discussion

markdown guide
 

Hey, this looks brilliant. Nice work. I love that it's easy to follow for people new that are picking up serverless.

A few things you might consider to make it even more brilliant:

  • Assuming that it is mandatory to use the ?word query param, this should be a path paramater. See: stackoverflow.com/questions/115522... That is, of course if it is mandatory and a user can't do: https://b8qalj4ph8.execute-api.ap-south-1.amazonaws.com/production/dictionary to get all values.
  • The "success" field in the body is probably not required, since the status code will tell you this.
  • I'm not a fan of putting the api key in the URL. Why? Because often logging tools will log it, and it's meant to be a secret. The norm is to use an Authorization header, api gateway does support this too.
  • It would be awesome to remove the commented out code in serverless.yml to make it easier for people new to serverless to come and see what is in there.

Keep up the awesome work!

 

Thanks for the feedback. I'll update the repository with the new changes.