Guide to the Cloud Resume Challenge — Part 3: DynamoDB, API gateway, and Lambda functions

In this article, we will see the setup of the DynamoDB, API gateway & Lambda functions

import json
import boto3
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('sample_table')
def lambda_handler(event, context):
response = table.get_item(Key={
'record_id':'0'
})
return response['Item']['record_count']
import json
import boto3
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('sample_table')
def lambda_handler(event, context):
response = table.get_item(Key={
'record_id':'0'
})
record_count = response['Item']['record_count']
record_count = record_count + 1
print(record_count)
response = table.put_item(Item={
'record_id':'0',
'record_count': record_count
})

return "Records added successfully!"

--

--

--

I spend my day learning AWS, Kubernetes & Cloud Native tools. Nights on LinkedIn & Medium. Work: Engineering @ PayPal.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Creating Geographic Heatmaps on a Flask application!

How I learnt to code

Turbine: Putting the “App” in Data App

Leo TechnoSoft (LTS) is leader in providing Right-shore Captive Team for ISV’s and Start-ups.

Implementing a server for the Language Server Protocol

AWS Money Saving Tools- Part One

Create simple 3D button animation with Flutter

Benefits of Being a Software Vegetarian

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Shishir Khandelwal

Shishir Khandelwal

I spend my day learning AWS, Kubernetes & Cloud Native tools. Nights on LinkedIn & Medium. Work: Engineering @ PayPal.

More from Medium

AWS Tutorial : AWS App Runner

Getting Started with AWS IAM user and S3

AWS Certified Solutions Architect Associate — Learning Materials

CI/CD Pipeline Automation using GitHub and S3