This shows some of the things you might encounter when using the AWS API Gateway to call a Lambda function that accesses an RDS database. It can be really hard to troubleshoot and understand why things are not working.
Event properties:
{
resource: '',
path: '',
httpMethod: '',
headers: null,
queryStringParameters: null,
pathParameters: null,
stageVariables: null,
requestContext:
{
path: '',
accountId: '',
resourceId: '',
stage: '',
requestId: '',
identity:
{
cognitoIdentityPoolId: null,
accountId: '',
cognitoIdentityId: null,
caller: '',
apiKey: '',
sourceIp: '',
accessKey: '',
cognitoAuthenticationType: null,
cognitoAuthenticationProvider: null,
userArn: '',
userAgent: '',
user: ''
},
resourcePath: '',
httpMethod: 'GET',
apiId: ''
}
body: null,
isBase64Encoded: false
Ещё видео!