aws-lambda

How to access the aws parameter store from a lambda using node.js and aws-sdk

余生颓废 提交于 2021-01-21 08:36:32
问题 I've created a lambda and cloud formation template which grants a lambda access to the parameter store and secrets manager. When I test the lambda I have the following functions outside of the export.handler function: function getParameterFromStore(param){ let promise = new Promise(function(resolve, reject){ console.log('++ ' + param.Path); servmgr.getParametersByPath(param, function(err, data){ if(err){ reject(console.log('Error getting parameter: ' + err, err.stack)); } else { resolve(data)

How to access the aws parameter store from a lambda using node.js and aws-sdk

半城伤御伤魂 提交于 2021-01-21 08:36:29
问题 I've created a lambda and cloud formation template which grants a lambda access to the parameter store and secrets manager. When I test the lambda I have the following functions outside of the export.handler function: function getParameterFromStore(param){ let promise = new Promise(function(resolve, reject){ console.log('++ ' + param.Path); servmgr.getParametersByPath(param, function(err, data){ if(err){ reject(console.log('Error getting parameter: ' + err, err.stack)); } else { resolve(data)

AWS Lambda keeps returning “\”Hello from Lambda!\"

旧城冷巷雨未停 提交于 2021-01-20 04:58:49
问题 I'm having some issues with AWS Lambda for Python 3.8. No matter what code I try running, AWS Lambda keeps returning the same response. I am trying to retrieve a information from a DynamoDB instance with the code below: import json import boto3 dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('planets') def lambda_handler(event, context): response = table.get_item( Key = { 'id':'mercury' } ) print(response) # TODO implement return { 'statusCode': 200, 'body': response) } I am

AWS Lambda keeps returning “\”Hello from Lambda!\"

我们两清 提交于 2021-01-20 04:57:06
问题 I'm having some issues with AWS Lambda for Python 3.8. No matter what code I try running, AWS Lambda keeps returning the same response. I am trying to retrieve a information from a DynamoDB instance with the code below: import json import boto3 dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('planets') def lambda_handler(event, context): response = table.get_item( Key = { 'id':'mercury' } ) print(response) # TODO implement return { 'statusCode': 200, 'body': response) } I am

AWS Lambda keeps returning “\”Hello from Lambda!\"

≯℡__Kan透↙ 提交于 2021-01-20 04:57:06
问题 I'm having some issues with AWS Lambda for Python 3.8. No matter what code I try running, AWS Lambda keeps returning the same response. I am trying to retrieve a information from a DynamoDB instance with the code below: import json import boto3 dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('planets') def lambda_handler(event, context): response = table.get_item( Key = { 'id':'mercury' } ) print(response) # TODO implement return { 'statusCode': 200, 'body': response) } I am

AWS Lambda loading libraries each time?

断了今生、忘了曾经 提交于 2021-01-19 06:12:23
问题 I am looking at AWS Lambda to create a Python function that would process data. I need to load a heavy model to run my script (trained word2vec model), it takes about 5 min to do it on my computer for example. But once it's loaded, the execution of the function is very fast. If I use AWS Lambda, will this model load only once or will it load each time I call my function ? Thanks, 回答1: Maybe . AWS Lambda uses reusable containers. So, for your use case, the Lambda function will execute quickly

AWS Lambda loading libraries each time?

流过昼夜 提交于 2021-01-19 06:10:09
问题 I am looking at AWS Lambda to create a Python function that would process data. I need to load a heavy model to run my script (trained word2vec model), it takes about 5 min to do it on my computer for example. But once it's loaded, the execution of the function is very fast. If I use AWS Lambda, will this model load only once or will it load each time I call my function ? Thanks, 回答1: Maybe . AWS Lambda uses reusable containers. So, for your use case, the Lambda function will execute quickly

AWS Lambda loading libraries each time?

给你一囗甜甜゛ 提交于 2021-01-19 06:08:20
问题 I am looking at AWS Lambda to create a Python function that would process data. I need to load a heavy model to run my script (trained word2vec model), it takes about 5 min to do it on my computer for example. But once it's loaded, the execution of the function is very fast. If I use AWS Lambda, will this model load only once or will it load each time I call my function ? Thanks, 回答1: Maybe . AWS Lambda uses reusable containers. So, for your use case, the Lambda function will execute quickly

Lambda S3 Put function not triggering for larger files

走远了吗. 提交于 2021-01-18 10:11:27
问题 I am currently exploring storing the attachments of an email separately from the .eml file itself. I have an SES rule set that delivers an inbound email to a bucket. When the bucket retrieves the email, an S3 Put Lambda function parses the raw email (MIME format), base64 decodes the attachment buffers, and does a putObject for each attachment and the original .eml file to a new bucket. My problem is that this Lambda function does not trigger for emails with attachments exceeding ~3-4 MB. The

Lambda S3 Put function not triggering for larger files

╄→尐↘猪︶ㄣ 提交于 2021-01-18 10:10:01
问题 I am currently exploring storing the attachments of an email separately from the .eml file itself. I have an SES rule set that delivers an inbound email to a bucket. When the bucket retrieves the email, an S3 Put Lambda function parses the raw email (MIME format), base64 decodes the attachment buffers, and does a putObject for each attachment and the original .eml file to a new bucket. My problem is that this Lambda function does not trigger for emails with attachments exceeding ~3-4 MB. The