Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import json
  2. import boto3
  3.  
  4.  
  5. def lambda_handler(event, context):
  6.  
  7. dynamodb = boto3.resource("dynamodb")
  8. table_name = "article"
  9. article_table = dynamodb.Table(table_name)
  10.  
  11. response = article_table.get_item(
  12. Key=event
  13. )
  14.  
  15. return {
  16. "status_code": 200,
  17. "body": response
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement