We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37f1b29 commit 37fc43fCopy full SHA for 37fc43f
packages/cubejs-serverless-aws/index.js
@@ -24,10 +24,17 @@ class AWSHandlers extends Handlers {
24
}
25
26
async process(event) {
27
- await Promise.all(event.Records.map(async record => {
28
- const message = JSON.parse(record.Sns.Message);
29
- await this.processMessage(message);
30
- }));
+ if (event.Records) {
+ await Promise.all(event.Records.map(async record => {
+ const message = JSON.parse(record.Sns.Message);
+ await this.processMessage(message);
31
+ }));
32
+ } else {
33
+ this.serverCore.logger('Invalid Lambda Process Message', {
34
+ warning: `Event doesn't contain Records field. Skipping.`,
35
+ lambdaEvent: event
36
+ });
37
+ }
38
39
return {
40
statusCode: 200
0 commit comments