aws-lambda

AWS Cloudformation : Passing environmental variables as parameters to lambda functions

我的未来我决定 提交于 2019-12-11 03:06:54
问题 I am creating a cloud formation for lambda . I want to have a generic lambda script that created lambda . I am having problem injecting "Environment" parameter from outside . I want to pass the key value pair object as parameter . Can some one tell me how to do it . I have highlighted it below { "Variables" : **{ String:String, ... }** } { "Type" : "AWS::Lambda::Function", "Properties" : { "Code" : Code, "DeadLetterConfig" : DeadLetterConfig, "Description" : String, "Environment" :

How to get AWS API Gateway invoke URL in an AWS Lambda function?

淺唱寂寞╮ 提交于 2019-12-11 02:59:28
问题 I'm using the proxy integration with my Java lambda function. The input for the lambda handler is a JSON object that represents an incoming request. It has a body, headers, query params and so on. But it doesn't include the source URL that is parsed by the API Gateway for the body, query params and etc. Is there a way to get it? The thing is API Gateway doesn't support arrays in query parameters. Example: /endpoint?numbers=1&numbers=2 . Seems, the only way to pass an array is to pass it as a

AWS: Lambda function cannot call rest api using private API of EC2 instance

只愿长相守 提交于 2019-12-11 02:41:33
问题 I am creating a lambda function (having full access to ec2 instances and following actions (DescribeStream, GetRecords, GetShardIterator, ListStreams)on dynamo db stream). My requirement is to using elb name get the private IPs of the instances and call rest API on lambda event triggered by DynamoDB stream. My Python3.6 script for the Lambda Function is working properly to get all the private IPs. But I don't know how to call rest API using the private IP. I would like to inform that we have

Cannot destroy Firebase connections making hot Lambda fail due to 'Firebase App name '[DEFAULT]' already exists'

点点圈 提交于 2019-12-11 02:25:55
问题 Been trying every approach I can think of for hours. Basically I'm running an AWS Lambda function which does some work to my Firebase app in both a client and server role. Being on Lambda, I need to be able to reverse the firebase.initializeApp(config) and firebase.initializeApp(config, 'server') . I've tried firebase.app('server').delete() but that doesn't seem to work. Thanks in advance for any help. To clarify, I can't just use the existing connection because the config may change. 回答1:

Installing NLTK/WORDNET on AWS Lambda via CodeBuild

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 02:21:27
问题 I'm trying to get NLTK and Wordnet working on a lambda via CodeBuild. It looks like it installs fine in CloudFormation, but I get the following error in the Lambda: START RequestId: c660c446-e1c4-11e8-8047-15f59f1e002c Version: $LATEST Unable to import module 'index': No module named 'nltk' END RequestId: c660c446-e1c4-11e8-8047-15f59f1e002c REPORT RequestId: c660c446-e1c4-11e8-8047-15f59f1e002c Duration: 2.10 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 21 MB However when

How to invoke an AWS Lambda function asynchronously

非 Y 不嫁゛ 提交于 2019-12-11 02:12:13
问题 Does anyone know the current and correct way to invoke Amazon AWS Lambda functions asynchronously instead of synchronously? The InvokeAsync API in the AWS Java SDK is still available but marked as deprecated and they suggest you use use the Invoke API. I can't figure out why they would be forcing us to using sync. I have a web frontend that dispatches some batch jobs. I can't expect the frontend to keep a connection open for several minutes while it waits for the response (which is actually e

aws lambda webpack generated file

六月ゝ 毕业季﹏ 提交于 2019-12-11 01:58:16
问题 I'm trying to deploy a aws lambda function with the handler generated through webpack. This is the final webpack file. I have removed most of the standard webpack code for ease of understanding. /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ } /************************************************************************/ /******/

Allow all cloudwatch event rules to have access to lambda function

半城伤御伤魂 提交于 2019-12-11 01:57:07
问题 I have been encountering a hard limit on lambda function policy when trying to provision access for a cloudwatch event rule to trigger the lambda function on a scheduled basis. An error occurred (PolicyLengthExceededException) when calling the AddPermission operation: The final policy size (20670) is bigger than the limit (20480). It works for a new lambda function, but eventually its policy will bloat and will hit a hard limit on the number on cloudwatch event rule that can access it. Some

Lambda does not trigger SNS event. Chaining AWS lambdas with SNS

北战南征 提交于 2019-12-11 01:32:49
问题 I am using AWS to chain lambdas together by having a second lambda subscribe to the SNS feed of the first lambda. The second lambda was not receiving anything from the first lambda and I also get no notification in CloudWatch (or my personal email that I subscribed with) that the SNS event has been triggered. So, I am wondering the question: How do I make sure my SNS receives an event from my lambda firing? When I use the SNS web UI I get logs like these and my lambda logs show they have been