You can access the requirements for the cloud resume challenge here
Visit Counter Tutorial
Services Used: DynamoDb
Aws Lambda
Api Gateway
Steps:
- 1) Create a table in Dynamodb by going to the service and clicking the create table button
2)Enter the table name of your choice, A partition key that will be used to describe the value being called from your api gateway ( in simple terms this is the primary value you will tell the api gateway to access before it, like the header of a column in excel, i used Stat) , select the type of value to be number instead of string and hit create. The rest of the settings can be kept at default.
3) Once the table has been created, next to the actions menu, click the explore table items and click the create item button and enter the heading of the item( for example i used view-count) and press create item.Once the item is created we are good to go and call it when we please using the lambda function
4) After we have set up the dynamoDB we can go ahead and code out the lambda function. We do this by searching lambda in the search box and clicking on it. Once we are on the lambda site go ahead and click the Create function. Once we click that we are taken to the lambda screen where we can type out our code. The Code i used is shown below
- We can then add a trigger which would invoke the lambda function when called and that trigger can range from a few things, but we will be using API gateway as our trigger.
Once we have selected the api gateway we are good to go. If you click your API gateway trigger that you can call whenever and get the value to display on your website.