Jymit / CheatSheet

notes
2 stars 0 forks source link

swa.rev() #4

Closed Jymit closed 4 years ago

Jymit commented 4 years ago

first lambda https://hackernoon.com/write-your-first-aws-lambda-function-hp3t3296

req

import json

def lambda_handler(event, context):
    n = int(event['n'])
    sqr = n ** 2
    return {
        'statusCode': 200,
        'body': json.dumps(sqr)
    }

resp

{
  "statusCode": 200,
  "body": "625"
}