DEV Community

Discussion on: 🚀 Dictionary API built using Serverless Framework and AWS Lambda Functions

Collapse
 
nutterzuk profile image
Stephen Nutbrown • Edited

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!

Collapse
 
realabbas profile image
Ali Abbas

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