- The 150+ best Amazon Spring Sale tech deals live
- This pocket-sized power bank keeps my iPhone charged all day (and it's on sale)
- Tired of restless nights? These sleep earbuds helped me doze off and they're $30 off
- The latest AirPods 4 are on sale for their best price yet during Amazon's Spring Sale
- This HP Pavilion at 55% off is the Windows laptop deal to beat right now
Unlocking Serverless with AWS Lambda and IAM
As I mentioned earlier we find the code for our two Lambda functions create-user and get-user under their respective folders. import jsonimport boto3import os client = boto3.client(‘dynamodb’) table_name = os.getenv(“TABLE_NAME”) def handler(event, _): body = json.loads(event[‘body’]) data = client.put_item( TableName=table_name, Item={ ‘id’: { ‘S’: body[‘id’] }, ‘name’: { ‘S’: body[‘name’] } })response…
Read More