Datasets:
GenIaC-SecBench / human_reference_dataset /iac-model-evaluation /cdk /python /api-gateway /lambda /hello.py
| import json | |
| #Define a lambda function which prints a standard msg on receiving a hit on the endpoint | |
| def handler(event, context): | |
| print('request: {}'.format(json.dumps(event))) | |
| return { | |
| 'statusCode': 200, | |
| 'headers': { | |
| 'Content-Type': 'text/plain' | |
| }, | |
| 'body': 'Hello, CDK! You have hit {}\n'.format(event['path']) | |
| } | |