aws-lambda

Credentials error when using google transfer service to transfer file from AWS to GCP

大憨熊 提交于 2019-12-11 16:51:54
问题 We have developed an automated pipeline that mainly does tasks on AWS and then some downstream work on Google Cloud. The tasks are deployed on AWS via AWS StepFunctions/Lambda and we need to pass processed files from AWS to Google Cloud Storage (via Google Transfer Service). However, I've been having trouble wiring together the AWS and GCP part. I have a Lambda function for implementing Google Transfer Service (via google's python client library), however I keep getting the error: module

API-Gateway Integration Request HTTP Header not mapping query string to header

China☆狼群 提交于 2019-12-11 16:32:54
问题 On Api-Gateway i'm trying so set up mapping from 'Method Request' query string to 'integration request' headers to lambda but the mapping never reach the lambda function. On 'Method Request' > 'URL Query String Parameters' I set it up the name 'customerIdentification' Then as the documentation says: doc went to 'Integration Request' > 'HTTP Headers' add a name 'userId' and mapped to 'method.request.querystring.customerIdentification' package main import ( "context" "encoding/json" "fmt"

How to take RDS Snapshot Status as input in AWS Lambda function written in Nodejs

浪尽此生 提交于 2019-12-11 16:26:13
问题 In Params for the status variable what i have to write to take the status of snapshot as the input. Expected Output: Hello Team, The manual Snapshot of RDS Instance has Started Successfully DB Instance : mysql Region : undefined Latest Snapshot : mysql-test STARTED-TIME : 11/26/2019, 3:03:52 PM status : Creating Thanks & Regards AWS Lambda. var AWS = require('aws-sdk'); const awsConf = { region: process.env.REGION }; const rdsConfig = { apiVersion: '2014-10-31', ... awsConf }; const snsConfig

Mailing isn't working in Django AWS Lambda (Zappa) behind a VPC

和自甴很熟 提交于 2019-12-11 16:18:57
问题 I have an AWS lambda function (Django zappa) that is running inside a VPC thus I'm not able to send emails because Lambda isn't connected to the internet, I tried NAT Gatway but with no hope. I created a NAT Gatway using one public subnet of the VPC. Created another private subnet with a route table that routes 0.0.0.0/0 to the NAT Gateway. I would appreciate any help. 回答1: Go to VPC Dashboard and use the Launch VPC Dashboard Create (Allocate) an elastic IP address and keep it handy. Select

Django AJAX Request Only Getting Last Element (not getlist issue)

房东的猫 提交于 2019-12-11 16:12:13
问题 I'm trying to make a tagging system in Django. Basically I'm passing through a list of tags (checkboxes in a form) through AJAX to a Django view which will update the list of tags with a new selection of relevant tags in an httpresponse. The problem is that Django only seems to be receiving the last element of the list on its own even after getlist. In fact, if I print the entire request.GET, it shows just one element in each list. The javascript/jQuery code is here: $(document).on('change',

How to include exe file from Nuget in .NET Core AWS Lambda package?

一曲冷凌霜 提交于 2019-12-11 16:01:43
问题 I've added Selenium.PhantomJS.WebDriver to a .NET Core AWS Lambda function which outputs phantomjs.exe to the bin folder when built locally. However, when I publish the project to AWS, the file is not included in the package. How do I tell AWS Toolkit this file needs to be included within the package? 来源: https://stackoverflow.com/questions/56989452/how-to-include-exe-file-from-nuget-in-net-core-aws-lambda-package

Trigger Alexa Skill From AWS Lambda

寵の児 提交于 2019-12-11 15:59:26
问题 I have gone through some of the documentation of AWS Lambda, I see we can attach a trigger(Alexa Skill Kit) to lambda function and lambda function will be triggered once the skill gets invoked. (Someone Calls Alexa and Lambda gets triggered) But i want vice-versa of this, like I should be able to invoke a skill set from AWS Lambda function, like i write a AWS lambda function and should be able to make a call to invoke that Alexa skill which i have published. (Lambda gets triggered from my

Lambda function times out after finishing

痞子三分冷 提交于 2019-12-11 15:52:30
问题 I have a lambda function that is completing without errors (I get to the console.log() line), but still times out. I have tried debugging with lambda-local , but cannot find where the hold up is. I read multiple places that I should include context.callbackWaitsForEmptyEventLoop = false in my handler function, but that makes no difference error. Is there something else I'm missing or not calling that is preventing this function from not timing out? After the consol.log() function gets printed

Can GET but not POST to a Lambda via API Gateway. Why?

不羁的心 提交于 2019-12-11 15:44:41
问题 Below is the request the client makes. The GET request is a success, but the POST request gives an error. fetch('api/public/libraries/sign-out-discourse', { method: 'GET', // or 'POST' headers: new Headers([ ['Accept', 'application/json'], ['Content-Type', 'application/json'], ['Authorization', jwtToken], ]), }) Here is the error from the POST request: HTTP/1.1 403 Forbidden Server: CloudFront Date: Fri, 05 Oct 2018 08:50:14 GMT Content-Type: text/html Content-Length: 694 Connection: keep

Optional parameters when using AWS CLI to launch CloudFormation template

。_饼干妹妹 提交于 2019-12-11 15:42:49
问题 I'm trying to create a CloudFormation template that'll deploy a Lambda function, And I need the security options to be optional parameters. I was able to partially accomplish this using the question here: How to make a whole object in CloudFormation templates optional? Interestingly, that method worked great to make the VpcConfig property optional in the AWS GUI Console, but it did NOT work to make it optional for the CLI. And unfortunately, I need it to work in the CLI, since I'll be using