aws-lambda

/lib64/libc.so.6: version `GLIBC_2.32' not found

喜夏-厌秋 提交于 2020-12-15 04:54:28
问题 I'm building the lambda on Ubuntu with the basic example. It builds without any errors but if I upload and test it on aws in crashes with: { "errorMessage": "RequestId: 7f4d0aca-125c-4032-98dd-9ff387e5252b Error: Runtime exited with error: exit status 1", "errorType": "Runtime.ExitError" } The log output is: START RequestId: 7f4d0aca-125c-4032-98dd-9ff387e5252b Version: $LATEST.~.jwtauthorizeraws.jwtauthorizerawsapplication: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by ./~

Including headers and data array in Return Statement with Node.js

白昼怎懂夜的黑 提交于 2020-12-15 01:48:32
问题 I have a lambda function that gets all items in a dynamoDB table as seen below. I am wondering if there is a way to include the response headers as well as the "scanResults" array in the return statement. In my current code I can either include the headers or the scanResults array. I have tried putting two return statements but that is incorrect code. Is there a way to combine them? Thanks in advance for any help. 'use strict'; const AWS = require('aws-sdk'); exports.handler = async (event,

Including headers and data array in Return Statement with Node.js

孤街醉人 提交于 2020-12-15 01:43:11
问题 I have a lambda function that gets all items in a dynamoDB table as seen below. I am wondering if there is a way to include the response headers as well as the "scanResults" array in the return statement. In my current code I can either include the headers or the scanResults array. I have tried putting two return statements but that is incorrect code. Is there a way to combine them? Thanks in advance for any help. 'use strict'; const AWS = require('aws-sdk'); exports.handler = async (event,

How to loop extract element from dynamodb recursively

家住魔仙堡 提交于 2020-12-15 01:41:06
问题 1 I am trying to extract element from dynamdb recurselvely 2 I have dynamodb table with below attributes `id, masterId, masterName` 3 I need to go to each id in the dynamodb check whether 'masterId' != '' and 'masterName' != 'Reserved' 4 if 3rd one got success then I need to extract ``'masterId' and 'masterName' to totallist ` ** Now pass masterId to same function as id this will keep on running till 'masterId' == '' and 'masterName' == 'Reserved' else: add to newlist_dict Basically for the

trigger lambda from a button in a static website in s3

邮差的信 提交于 2020-12-13 06:39:26
问题 I have this static website that has a form with a couple of fields. CloudFront is on front of the bucket routing traffic to the site. Them form in question naturally has a button that POST to '#'. Is there a way I could make the hits on the button trigger a lambda function with the content of the form's fields? Thanks in advance. 回答1: API Gateway is typically used to call the Lambda function from a Web Page. Here is a basic tutorial matching your architecture: https://aws.amazon.com/getting

trigger lambda from a button in a static website in s3

偶尔善良 提交于 2020-12-13 06:35:05
问题 I have this static website that has a form with a couple of fields. CloudFront is on front of the bucket routing traffic to the site. Them form in question naturally has a button that POST to '#'. Is there a way I could make the hits on the button trigger a lambda function with the content of the form's fields? Thanks in advance. 回答1: API Gateway is typically used to call the Lambda function from a Web Page. Here is a basic tutorial matching your architecture: https://aws.amazon.com/getting

Pass parameters from AWS lambda to AWS CodePipeline

佐手、 提交于 2020-12-13 04:16:50
问题 I have a lambda that is initiating a CodePipeline execution via the AWS SDK startPipelineExecution function. Is there any mechanism available to pass a parameter to the CodePipeline build so that it may use the value within the CodeBuild build as an environment variable? 回答1: Currently CodePipeline does not provide any functionality for passing parameters into the Source Stage. Depending on the CodePipeline setup, I would look into one of the following: From your Lambda function, save the

Pass parameters from AWS lambda to AWS CodePipeline

橙三吉。 提交于 2020-12-13 04:16:25
问题 I have a lambda that is initiating a CodePipeline execution via the AWS SDK startPipelineExecution function. Is there any mechanism available to pass a parameter to the CodePipeline build so that it may use the value within the CodeBuild build as an environment variable? 回答1: Currently CodePipeline does not provide any functionality for passing parameters into the Source Stage. Depending on the CodePipeline setup, I would look into one of the following: From your Lambda function, save the

DynamoDb UpdateItem runs twice

只愿长相守 提交于 2020-12-13 03:40:36
问题 When I update an item via update (updateItem) then the update function is called twice and my value will be added two times. I use async/await and it should work. var ddb = new AWS.DynamoDB.DocumentClient({ apiVersion: '2012-08-10' }); async function updateUserGame(tablePostfix, gameId, durationinMin) { console.log("###### updateUserGame") var tableUserGames = tableUserGamesWithoutPostfix + tablePostfix; expressions = { ":duration": parseInt(durationinMin) } updateExpressions = "set

DynamoDb UpdateItem runs twice

℡╲_俬逩灬. 提交于 2020-12-13 03:38:17
问题 When I update an item via update (updateItem) then the update function is called twice and my value will be added two times. I use async/await and it should work. var ddb = new AWS.DynamoDB.DocumentClient({ apiVersion: '2012-08-10' }); async function updateUserGame(tablePostfix, gameId, durationinMin) { console.log("###### updateUserGame") var tableUserGames = tableUserGamesWithoutPostfix + tablePostfix; expressions = { ":duration": parseInt(durationinMin) } updateExpressions = "set