Complete the code to specify the integration type for API Gateway to invoke Lambda.
IntegrationType = "[1]"
The integration type AWS_PROXY allows API Gateway to directly invoke Lambda functions.
Complete the code to define the HTTP method for the API Gateway resource.
httpMethod = "[1]"
The GET method is commonly used to retrieve data via API Gateway.
Fix the error in the Lambda function handler signature.
def lambda_handler([1], context): return {'statusCode': 200, 'body': 'Hello from Lambda!'}
The first parameter of a Lambda handler is conventionally named event, representing the input event.
Fill both blanks to create a resource path and attach a GET method in API Gateway.
resource = api.root.add_resource("[1]") resource.add_method("[2]", lambda_integration)
The resource path users is created, and the GET method is attached to it.
Fill all three blanks to configure Lambda permissions for API Gateway invocation.
lambda_function.add_permission(
Action="[1]",
Principal="[2]",
SourceArn="[3]"
)Lambda permission must allow lambda:InvokeFunction action, with apigateway.amazonaws.com as principal, and the API Gateway's SourceArn to restrict invocation.