5. End Result!
● Can we get a 200 OK???
Make an API call to your own API! 200 OK!
6. What do you
need?
● We have an API!
● Prerequisites
Do I need anything installed?
● Node.js
○ v10.16.3
○ Version check: node -v
○ Nodejs.org
● AWS Account and credentials
○ for IAM, DynamoDB, and API Gateway
○ aws.amazon.com (Click Services)
● Serverless Framework
○ v1.53.0
○ Version check: serverless --version
○ serverless.com
● Postman
○ getpostman.com
13. Technologies
Used
● Serverless
● IAM
● DynamoDB
● API Gateway
API Gateway -Amazon Web Service’s API Gateway is for
creating, publishing, maintaining, monitoring, and security
REST and WebSocket APIs at any scale.
14. Technologies
Used
● Serverless
● IAM
● DynamoDB
● API Gateway
● Postman
Postman - Postman is a collaboration platform for API development.
Postman's features simplify each step of building an API and streamline
collaboration so you can create better APIs—faster.
https://www.getpostman.com/
17. Create an AWS Access Key
Search for IAM in Amazon’s AWS and Set up a User
https://serverless.com/framework/docs/providers/aws/guide/credentials/
Quick Instructions:
IAM -> Users -> Add User -> Enable Programmatic Access -> Next ->
Create User
@tessamero
26. Looking into
the Code
● File Structure
File Structure - node_modules and json
files, and serverless.yml. Then you have the
todos folder that we will take a look at.
27. Looking into
the Code
● File Structure
● Serverless.yml file
serverless.yml - the file that describes the
entire application architecture
28. Looking into
the Code
● File Structure
● Serverless.yml file
● todos folder
todos folder - create.js, delete.js, get.js,
list.js, and update.js for each method for
your API calls.
29. Looking into
the Code
● File Structure
● Serverless.yml file
● todos folder
● create.js file
create.js - a peek into create function
30. Looking into
the Code
● File Structure
● Serverless.yml file
● todos folder
● create.js file
● delete.js file
delete.js - a peek into delete function
31. Looking into
the Code
● File Structure
● Serverless.yml file
● todos folder
● create.js file
● delete.js file
● get.js
get.js - a peek into get function
32. Looking into
the Code
● File Structure
● Serverless.yml file
● todos folder
● create.js file
● delete.js file
● get.js
● list.js
list.js - a peek into list function
33. Looking into
the Code
● File Structure
● Serverless.yml file
● todos folder
● create.js file
● delete.js file
● get.js
● list.js
● update.js
update.js - a peek into update function
34. Resources:
The Serverless Revolution: Why and How The Movement Will Allow Teams to
Deploy with More Velocity and Confidence, by Ravi Lachhman
Serverless’s Sample Integration with AWS, Serverless GitHub
Anatomy of a Serverless Yaml file, by Richard Keller
List of Resources on Serverless and JAMstack, by css-tricks.com
Ready for the next level of this talk? David Reno’s talk at 2:55 PM in this room for
more goodies!