Skip to content
This repository was archived by the owner on Oct 9, 2021. It is now read-only.

Edited nodejs in cft to 8.10 #76

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions CloudFormation/CreateZombieWorkshop.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@
"S3Bucket": { "Fn::FindInMap" : [ "AllowedRegions", { "Ref" : "AWS::Region" }, "S3ContentsBucket"]},
"S3Key": "S3GetFilesFunction.zip"
},
"Runtime": "nodejs4.3",
"Runtime": "nodejs8.10",
"Timeout": "120"
},
"DependsOn": [
Expand All @@ -395,7 +395,7 @@
"S3Bucket": { "Ref" : "S3BucketForWebsiteContent" },
"S3Key": "cognitoTriggerBuild.zip"
},
"Runtime": "nodejs4.3",
"Runtime": "nodejs8.10",
"Timeout": "120"
},
"DependsOn": [
Expand Down Expand Up @@ -456,7 +456,7 @@
"S3Bucket": { "Ref": "S3BucketForWebsiteContent" },
"S3Key": "WK305_Gateway.zip"
},
"Runtime": "nodejs4.3",
"Runtime": "nodejs8.10",
"Timeout": "300",
"MemorySize": "1536"
},
Expand All @@ -477,7 +477,7 @@
"S3Bucket": { "Ref": "S3BucketForWebsiteContent" },
"S3Key": "cognito.zip"
},
"Runtime": "nodejs4.3",
"Runtime": "nodejs8.10",
"Timeout": "300",
"MemorySize": "1536"
},
Expand Down Expand Up @@ -520,7 +520,7 @@
"S3Bucket": { "Ref" : "S3BucketForWebsiteContent" },
"S3Key": "ZombiePostMessage.zip"
},
"Runtime": "nodejs4.3",
"Runtime": "nodejs8.10",
"Timeout": "60"
},
"DependsOn": [
Expand All @@ -540,7 +540,7 @@
"S3Bucket": { "Ref" : "S3BucketForWebsiteContent" },
"S3Key": "ZombieGetMessages.zip"
},
"Runtime": "nodejs4.3",
"Runtime": "nodejs8.10",
"Timeout": "60"
},
"DependsOn" : [
Expand Down Expand Up @@ -596,7 +596,7 @@
"};\n"
]]}
},
"Runtime": "nodejs4.3",
"Runtime": "nodejs8.10",
"Timeout": "10"
},
"DependsOn" : ["TalkersDynamoDBTable","ZombieLabLambdaRole"]
Expand Down Expand Up @@ -656,7 +656,7 @@
"};\n"
]]}
},
"Runtime": "nodejs4.3",
"Runtime": "nodejs8.10",
"Timeout": "10"
},
"DependsOn" : ["TalkersDynamoDBTable", "ZombieLabLambdaRole"]
Expand Down Expand Up @@ -686,7 +686,7 @@
"S3Bucket": { "Ref" : "S3BucketForWebsiteContent" },
"S3Key": "IamUsers.zip"
},
"Runtime": "nodejs4.3",
"Runtime": "nodejs8.10",
"Timeout": "60"
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports.handler = function(event, context, callback) {
FunctionName: stackName + '-CognitoLambdaTrigger' + '-' + region,
Handler: 'index.handler',
Role: iamRole,
Runtime: 'nodejs4.3',
Runtime: 'nodejs8.10',
Timeout: '120'
};
lambda.createFunction(params, function(err, data) {
Expand Down
5 changes: 3 additions & 2 deletions ElasticSearchLambda/ZombieWorkshopSearchIndexing.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var path = require('path');

/* == Globals == */
var esDomain = {
region: 'us-west-2',
endpoint: 'https://ENDPOINT_HERE',
region: 'us-east-1',
endpoint: 'https://YOUR_ENDPOINT_HERE',
index: 'messages',
doctype: 'message'
};
Expand Down Expand Up @@ -48,6 +48,7 @@ function postToES(doc, context) {
req.region = esDomain.region;
req.headers['presigned-expires'] = false;
req.headers['Host'] = endpoint.host;
req.headers['Content-Type'] = 'application/json';
req.body = doc;

console.log('Creating the Signer for the post request');
Expand Down
Loading