Questions tagged [aws-lambda]

1

votes
0

answer
792

Views

Extract email attachment from SES into S3

I want to extract an email attachment and save that attachment into an S3 bucket. I have configured SES to intercept my incoming emails. I am guessing I need to create a SES rule which would have an action to trigger a Lambda function that extracts the email attachment and stores it to S3. I am not...
user1534235
1

votes
2

answer
592

Views

aws lambda didn't convert json request to POJO

I have a lambda function: package org.smarter.note; import com.amazonaws.services.lambda.runtime.Context; import com.amazonaws.services.lambda.runtime.LambdaLogger; import com.amazonaws.services.lambda.runtime.RequestHandler; public class AddNoteRequestHandler implements RequestHandler { private Not...
Jakim
1

votes
1

answer
112

Views

Alexa ASK Lambda bug

I'm trying to make a skill where after the LaunchRequest, an initial welcome message is played in the function StartGame asking the user for their school, and then the user says their school in the SetSchool intent, and then the skill says a message. Right now there's a bug in the last part, and I d...
Neil Chowdhury
1

votes
1

answer
296

Views

AWS Lambda Versioning - How do I have two separate lambda alias in a production stage?

I have a mobile app that invokes an AWS Lambda say for e.g. 'Hello'. Let's assume that there is a change to the 'hello' lambda function and it's published to a new version 2. But this lambda function will be invoked by the mobile App version 2 and will be available to users who have updated the App....
Karthik Shivkumar
1

votes
2

answer
53

Views

Create a response for invalid and incomplete end points using the Serverless Framework?

I have a series of HTTP endpoints that involve lambda functions that hit detail information like so: products/1 users/1 package/998134 There is not a corresponding endpoint for products/, users/ or package/. I have a custom authorizer around the users/{id} and package/{id} endpoints. If a user goes...
Serverless Qs
1

votes
1

answer
253

Views

AWS LAMBDA using java sdk SES Client times out

I have a very basic lambda function to send email The Code hangs on creating SES Client .i put logs before and after this statement of creating client . AmazonSimpleEmailService client = AmazonSimpleEmailServiceClientBuilder.standard().withRegion(Regions.EU_WEST_1) .withCredentials(new InstanceProf...
Ameen
1

votes
1

answer
402

Views

Do I give only the read-only RDS database permission for an aws lambda code, when I create custom role and edit the policy document this way?

I want to create an aws lambda code, which provides a public API for only read from an aws rds db instance. When I want to create a lambda function, it asks me about permission roles. Because I'm afraid, I want to give a very strict permission to the code to allow only the reading from the db instan...
user190528
1

votes
0

answer
88

Views

Is there a way to install a specific submodule of a package?

I'm working on a serverless project using sklearn.neural_network.MLPClassifier using AWS Lambda. AWS requires that all dependencies get uploaded with the project during deploy, is there a way to install only the files needed to use a specific classifier so I can save some bandwidth?
Ramon Balthazar
1

votes
0

answer
47

Views

ZentriOS hup POST request to upload text file using AWS API Gateway

We are requesting to AWS API Gateway URL, using ZentriOS hup command to upload text files. Here we are getting following error: Error with TLS handshake: 5018 (state: 2, code: 0X28) Screenshot attached to reference:
sriAnkush
1

votes
0

answer
158

Views

Using Google Login with Cognito Identity Pool to Authorize Lambda HTTP Requests

I'm sure someone must have gone through scenario; however, I have not been able to find some documentation/samples covering it. What I'm attempting to do Expose several REST endpoints using Lambda (severless), so this is a registered api with the api gateway Some of these endpoints require a user au...
Sam
1

votes
1

answer
195

Views

boto3 support for role_arn

I want to insert data from AWS Lambda to AWS DynamoDB and upload a file from Lambda to AWS S3. Currently, I'm using Access Key and Secret Key to do this from boto3. But, due to security issues, I had to change this approach to role-based approach. (i.e) To insert data in DDB or uploading a file to...
Droid
1

votes
1

answer
1.4k

Views

Lambda edge “The Lambda function returned invalid json: The json output is not parsable.”

I'm trying to read a JS file (gzipped so that it can fit the lambda edge limits) locally using nodeJS and return it in the response but I get the error from title. Why is that? Is gzip body forbidden by aws edge? 'use strict'; exports.handler = (event, context, callback) => { const request = event....
Books
1

votes
0

answer
410

Views

How to get timezone from lat long or zip code where tzwhere is not a option

As tzwhere is taking a longer time to run on Serverless, how do I get the proper timezone which supports daylight savings. I need to pass in either latitude and longitude or the zipcode to find the timezone, say, 'US/Eastern'.
ZZzzZZzz
1

votes
0

answer
42

Views

AWS Regional failover with secondary Region having no resources running untill failover happens

I have an application running in N.Virginia Region. I want to configure Regional failover such that if my N.Virgina region or application goes down, same application should come up secondary Region. Initially secondary Region should not have any resources. May be we can only have a CloudFormation te...
Abhizer Saifee
1

votes
0

answer
357

Views

Make AWS API Gateway with Lambda Invocation return 413 Payload Too Large

I am currently using AWS API Gateway in combination with a lambda invocation. This is working perfectly, as long as I stay withing the known AWS Lambda Limits. One of the calls receives a file via a POST request, so that goes fine as long as the file is < 6 MB. However when the file is too large, I...
Bram Vandewalle
1

votes
1

answer
1.9k

Views

AWS Lambda and S3 and Pandas - Load CSV into S3, trigger Lambda, load into pandas, put back in bucket?

I'm a noob to AWS and lambda, so I apologize if this is a dumb question. What I would like to be able to do is load a spreadsheet into an s3 bucket, trigger lambda based on that upload, have lambda load the csv into pandas and do stuff with it, then write the dataframe back to a csv into a second s...
Tkelly
1

votes
0

answer
282

Views

What is the purpose of AWS Sam local

Read some docs but I'm still really confused. Seems like the purpose of Sam local is to be able to test my Lambda is locally right? well many of my Lambdas invariably need to access a database (Dynamo) maybe some kind of storage (maybe like S3) as well as other services. How do I do that locally wit...
red888
1

votes
1

answer
426

Views

Asynchronously Write to Kinesis Stream from Java AWS Lambda

I am asynchronously writing to a Kinesis stream from my Java Lambda function using the AmazonKinesisAsyncClinet.putRecordAsync() method. The putRecordAsync() requests in the beginning of the Lambda function are appearing just fine in the Kinesis stream. However, the last few putRecordAsync() request...
cousinyoni
1

votes
0

answer
198

Views

AWS lambda as REST client

Is it possible to use lambda as a REST client? I want to have a lamda function which polls data from a REST api? For example: Poll weather data from a weather data service every second? Or is lambda not a good solution for that?
CPA
1

votes
1

answer
275

Views

Connection Reset by Peer Occuring on Lambda

I wrote a simple script in Python 2.7 that compiles my homework off of my school website using urllib(2), cookielib, and bs4. When I ran it off of my IDE it worked perfectly without any errors. However when compile it for Alexa and I run it on AWS Lambda, I receive the following error: [Errno 104] C...
Eliav Hamburger
1

votes
0

answer
1.2k

Views

Import CSV data from S3 to Dynamodb using Lambda

I want to Import CSV data from S3 to Dynamodb using Lambda Can I do this without using datapipeline? Below is the csv foramte Instance/Environment Name,Whitelisting End Date,Email ABC258,1/19/2018,[email protected] ABC259,1/19/2018,[email protected]
Ram Krishna
1

votes
0

answer
231

Views

AWS SAM Local access service on host from Lambda function

I am testing a Lambda function using SAM Local. The function calls out to a REST API. Locally I have a mock rest service for testing the call. To connect I am currently using the IP address of the host within the Lambda function. This works until my IP changes or someone else tries to run the fu...
user1686620
1

votes
0

answer
404

Views

OAuth using AWS Lambda and AWS API Gateway

I know AWS has added custom authorizers to support API Gateways (link: https://aws.amazon.com/blogs/compute/introducing-custom-authorizers-in-amazon-api-gateway/), but I have a basic question in the context of enabling OAuth on the APIs. I've so far been unable fo find anything concrete on it. The...
Vinay
1

votes
1

answer
367

Views

Does a “tiny” Tensorflow / Keras exist which can be executed with AWS Lambda?

The Python Tensorflow package is huge and AWS Lambda allows only 250 MB in which you have to bring all resources in a zip file, including all dependencies. Is it possible to have a 'minified' Tensorflow / Keras?
Martin Thoma
1

votes
2

answer
308

Views

Parsing response form AWSTask, returned from lambda in iOS swift 3

Any suggestions in how to parse AWSTask.result into JSON object? I am invoking AWS Lambda function, which returns a JSON string code below let task = lambdaInvoker.invokeFunction('LambdaFunction', jsonObject: ['processName':processName]) task.continue({ (task: AWSTask!) -> AWSTask! in if (task.error...
Vasu Seshadri
1

votes
0

answer
108

Views

How to use existing Cloud Formation template to generate SAM Local environment

I'm working on Data Lake project referring AWS Serverless Data Lake. https://github.com/awslabs/aws-data-lake-solution When I try to create SAM local template file I faced some problems with the configuration of existing resources(API Gateway, Coginto User Pool). Can I use the existing cloud form...
Daratha Galkissa
1

votes
1

answer
406

Views

How to add cognito user pool authorizer to Lambda Proxy integration in Cloud Formation Template?

I have the following cloud formation JSON template. This template is the default template provided by AWS for C#(Dotnet) Web API Lambda proxy integration. { 'AWSTemplateFormatVersion' : '2010-09-09', 'Transform' : 'AWS::Serverless-2016-10-31', 'Description' : 'An AWS Serverless Application that use...
Deepan Cool
1

votes
1

answer
456

Views

(Direct) AWS Lambda invocation response status code is 200 despite unhandled function error

I have an AWS Lambda which is designed for direct invocation from multiple applications within my team's service landscape. I'm writing a wrapper class which will perform this invocation, and associated validation and error detection / handling in the Lambda's response. By design, the Lambda termina...
Daniel B.
1

votes
1

answer
326

Views

Creating lambda function to create thumbnail for AWS s3 bucket is not working

I am learning using AWS lambda functions. What I am trying to do is, when I upload an image(jpg) file to the s3 bucket, the image will be resized. But it is not working. Please what I have done below. I create a folder. Then created a node_modules folder inside the previously created folder. Then cr...
Wai Yan Hein
1

votes
1

answer
156

Views

AWS Lambda elastic transcoder key encrypted HLS with playlist

I want to setup a automatic transcoding of a video to encrypted hls with a playlist. My lambda code is below, but when it is run, I get the following error { ValidationException: The MD5 hash of the base64-decoded value for ''Encryption:Key'' must equal the base64-decoded value for ''Encryption:Key...
robo
1

votes
2

answer
275

Views

Results of S3 function call are being cached by my Lambda function

I have a lambda function that uses S3.listObjects to return a directory listing. The listing is sometimes (not always!) out of date - it doesn't contain recently uploaded objects and has old modification dates for the objects that it does have. When I run the identical code locally it always works f...
Kwoxford
1

votes
1

answer
856

Views

Can I integrate firebase authentication with aws lambda

I am using Serverless framework (aws Lambda functions) but I want the authentication to be done by firebase. Is it possible to integrate this two?
Annie Alan
1

votes
0

answer
132

Views

The response is invalid, Alexa with DynamoDB

Hi I'm trying to create a skill that will scan my DynamoDB table and come back with showing times of a movie or what movies are showing at a certain time. This is my current Lambda function const AWSregion = 'us-east-1'; // us-east-1 const Alexa = require('alexa-sdk'); const AWS = require('aws-sdk...
zuba
1

votes
2

answer
598

Views

AWS Lambda Connect to Redshift DB using ODBC Connection

I am trying to connect to RedShift DB Using AWS Lambda from .NEt Core 2.0 C# App. Below is my approach. string connString = 'Driver={Amazon Redshift (x86)};' + String.Format('Server={0};Database={1};' + 'UID={2};PWD={3};Port={4};SSL=true;Sslmode=Require', RedShiftServer, RedShiftDBName, RedShiftUser...
Digambar
1

votes
0

answer
180

Views

Deploying KDB/Q as AWS Lambda functions

If I have KDB servers that can load up pretty rapidly and don't need to stay around more than 5 minutes, can I run them as AWS Lambda functions? One problem I see is that these functions need to do analysis on a large kdb database. There does not seem to be any way to get access to that database in...
JSLover
1

votes
0

answer
71

Views

What is the maximum outbound connections I can create from AWS Lambda?

I am looking at the documentation on Lamba Limits which says: Number of file descriptors 1,024 I am wondering if this is per invoking lambda or total across all lambdas? I am processing a very large number of items from a kinesis stream and I am calling a web endpoint and it I seem to be hitting...
justin.m.chase
1

votes
1

answer
313

Views

How to give parameters for AWS Lambda functions from an android application?

I worked on chat bot android application using amazon lex, for that i have created lambda functions using java project jar. That java project have handler method it will call my REST API. The Rest API request needs some parameters (like username , email id), so how can i pass that id's from android...
1

votes
0

answer
575

Views

aws Lambda Deployment automation using git,codepipeline,codebuild and cloudformation

I am Creating CI/CD pipeline for lambda deployment,i am using Git->Codebuild-> aws cloudfromation->lambda using codepipline ,even after successful build my buildspec.yaml not able to generate proper samTemplate containing proper CodeUri and i am getting error Unable to upload artifact ./ referenced...
Mayur
1

votes
1

answer
2.3k

Views

AWS Lambda interact with elastic search

I'm new in AWS world and try to dev a proof of concept that allow lambda function to interact with elasticSearch (AWS service) and S3 bucket. I'm not sure to understand really how it works. We have to set an IAM role linked to the Lambda function but no user so first question : Who is the user runn...
Desnoxav
1

votes
0

answer
251

Views

Splitting the initial file on AWS Step function parallel tasks

I want to run a parallel task with a step function on a really big file. is there a way to make the lambdas that will be processing the big file receive a different part of the file? Instead of them all getting the same big file?
WeCanBeFriends

View additional questions