aws-lambda

Deploying AWS Serverless lambda Application with AmazonServerlessApplicationRepositoryClient does not work?

丶灬走出姿态 提交于 2019-12-12 16:51:05
问题 I want to deploy my ASP.Net Core Web Application project through a c# console application. It means I am trying to create a serverless lambda application on AWS without AWS Toolkit or CLI command. I want to do this with AWS SDK. For this purpose I added below Nugets : AWSSDK.ServerlessApplicationRepository AWSSDK.Core AWSSDK.Lambda at first step I am making a package with msbuild command. Then Zipped and upload on S3 bucket and in final step I am running below code. It does not show me any

AWS API Gateway not working with custom domain

烈酒焚心 提交于 2019-12-12 16:46:56
问题 I've created an expressjs api and hosted in AWS lambda with an api gateway for the same. It is working fine as expected with the url: https://[api-id].execute-api.[region].amazonaws.com/prod/api/v1/todos But I want to invoke it using a custom domain and I confgiured it using the custom domain option of the api gateway. I've registered my domain using google domains and I've added the CNAME entry in DNS configuration to map it to the cloudfront target domain name. So far so good. The api

S3.getSignedUrl to accept multiple content-type

五迷三道 提交于 2019-12-12 16:10:10
问题 I'm using the react-s3-uploader node package, which takes in a signingUrl for obtaining a signedUrl for storing an object into S3. Currently I've configured a lambda function (with an API Gateway endpoint) to generate this signedUrl. After some tinkering, I've got it to work, but noticed that I have to define in my lambda function the content-type , which looks like this: var AWS = require('aws-sdk'); const S3 = new AWS.S3() AWS.config.update({ region: 'us-west-2' }) exports.handler =

Mount S3 File System in AWS Lambda?

倖福魔咒の 提交于 2019-12-12 16:06:27
问题 Do you know if it possible mounting a File System over AWS S3 to increase AWS Lambda storage? 回答1: You cannot mount Amazon S3 as a filesystem for use with AWS Lambda. AWS Lambda functions are designed to be short-running scripts that respond to an event in your environment (eg data coming into a Kinesis stream, a file being created in Amazon S3). They typically run only for a few seconds. While you haven't described your use-case, something that requires heavy use of a filesystem is not a

AWS Lambda get context message

一个人想着一个人 提交于 2019-12-12 15:51:25
问题 I am using the test function from AWS console: console.log('Loading event'); exports.handler = function(event, context) { console.log('value1 = ' + event.key1); console.log('value2 = ' + event.key2); console.log('value3 = ' + event.key3); context.done(null, 'Hello World'); // SUCCESS with message }; And calling it in nodejs as follows: var params = { FunctionName: 'MY_FUNCTION_NAME', /* required */ InvokeArgs: JSON.stringify({ "key1": "value1", "key2": "value2", "key3": "value3" }) }; lambda

Amazon Lex accepting ConfirmIntent on any response

左心房为你撑大大i 提交于 2019-12-12 15:18:20
问题 I have an intent-A which is triggered by some user input. When the response is given to user I have used ConfirmIntent instead of Close so that I can switch/chain another intent (lets say intent-B ). Ideally if user type "yes" then intent should be triggered and if user type "no" then it should not. Problem is that intent-B is being triggered no matter what I type. I have read about ConfirmIntent from here, here and here. Calling Code: session_attributes = {"confirmationContext":

AWS API to get Alexa voice

拥有回忆 提交于 2019-12-12 15:11:43
问题 Does anyone know if there is an AWS API or similar that would allow me to send in text (or SSML), and get back the audio of Alexa 'speaking' it. Crucially, I want the output in Alexa's 'voice' The options I have explored so far are: AWS Polly This was my first port of call and sounds promising, and simple to interact with; but the available voices do not include Alexa's voice (I think the GB voice for Alexa is 'Abbey') If I didn't need the voice to be Alexa's, I'd probably be using this idea

Error in publishing an AWS Lambda function built in .NET Core

一曲冷凌霜 提交于 2019-12-12 15:03:34
问题 As of Dec 1, 2016, AWS Lambda now supports functions in C# that runs in the .NET Core 1.0 runtime. So I created the function using the VS AWS Lambda Template. I tried to publish the lambda function via the "Publish to AWS Lambda..." context menu in VS. So after configuring the function(selecting the S3 bucket, region, etc) in the dialog box, I click publish and at the end of the publish process, I am getting error: Error creating CloudFormation change set: User: arn:aws:iam::***:user/demo

Updating custom resources causes them to be deleted?

匆匆过客 提交于 2019-12-12 14:28:00
问题 When using CloudFormation templates, I find the "Custom Resource" feature, with its Lambda backing function implementation, very useful to handle all kinds of tasks that CloudFormation does not provide good support for. Usually, I use custom resources to setup things during stack creation (such as looking up AMI names) or clean up things during deletion (such as removing objects from S3 or Route53 that would block deletion) - and this works great. But when I try to actually use a "custom

passing query params for aws lambda function

一曲冷凌霜 提交于 2019-12-12 13:22:17
问题 I am trying to set up a Lambda function that will pull query params that are passed into the API Gateway URL that is created. (Sidebar: I am still pretty green when it comes to programming, so please forgive any unintentional confusion regarding how to name things on my part). I've wrapped a few REST calls within a fiber using Synchronize.JS, and it works great when I hard code the variables that I want to pass into the various REST urls, but our goal is to be able to pass different