Questions tagged [aws-lambda]
AWS Lambda is a compute service that lets you run code without the overhead of managing servers. Questions using this tag should be about interacting with this service in a programming context (e.g. via API calls) or about code running on this service. (Not to be confused with the [lambda] tag, which instead refers to a type of function).
aws-lambda
32,048
questions
0
votes
1
answer
12
views
Lambda not working trigger message from SQS FIFO, but it does from SQS Standard
i just created lambda function that have trigger from SQS FIFO, but somehow not working.
Already add the AWSLambdaSQSQueueExecutionRole and AmazonSQSFullAccess to the lambda, but seems not working.
...
1
vote
0
answers
16
views
How do I add CORS header to AWS Lambda response headers using the Quarkus Lambda function?
When using Quarkus and considering using it to deploy lambda functions to AWS.
I've been able to create a function with GET and POST endpoints, link them to the API Gateway and hit them from Postman.
...
0
votes
0
answers
9
views
Syncing guthub repo to aws s3location using webhook
does someone know how to use aws lambda function to copy files from Github repository to S3 location.I have webhook setup that is listened through lambda function. I am able to extract the file names ...
0
votes
2
answers
21
views
DynamoDB BatchGetCommand 400 "key does not match schema"
I'm having an issue using BatchGetCommand to get a list of records from a DynamoDB table.
I am using an AWS Lambda that uses NodeJS 18.x.
I have been able to get ScanCommand, GetCommand and ...
1
vote
0
answers
34
views
How can invoke a Lambda function with AWS Signature auth without using Postman?
I have a simple Lambda function in Python that converts a text string into speech and saves it to an S3 bucket. I want to then get that mp3 file (or URL) as a response.
I will invoke the Lambda ...
-1
votes
0
answers
8
views
Extending io.quarkus.amazon.lambda.http.LambdaHttpHandler
I'm creating a custom handler that inherits from io.quarkus.amazon.lambda.http.LambdaHttpHandler because I need to intercept the request to perform some internal tasks.
Something like that:
`
public ...
-4
votes
0
answers
30
views
Baffling! Trying to get ChatGPT to perform an API call to Google Calendar API but it sometimes get stuck saying it made an event but there is no event [closed]
I'm currently working on a GPT powered chatbot for a medical practice. One of our use cases are that the chatbot should be able to schedule appointments for patients via the chatbot in Google Calendar....
0
votes
0
answers
12
views
Getting 403 when invoking external API from within AWS Lambda (NOT VPC)
We have a lambda that is NOT associated with a VPC but does have an associated API Gateway (but no api-key required). When I internally try to invoke an external API from within my Java lambda handler ...
0
votes
0
answers
6
views
How to restrict access to resources accessed via API Gateway using Cognito Custom Attributes
I have an app with a Cognito user base that has a custom attribute called "Tenant". I want to use this attribute to help me control the dynamoDB tables that are relevant to that user's ...
0
votes
0
answers
27
views
I keep getting an access denied error on my lambda function
I'm a beginner and I keep getting this error message when testing a Lambda function. I'm trying to do a simple write file to an S3 directory bucket.
Here is the PHP code:
import json
import boto3
...
0
votes
1
answer
22
views
Debounced s3 notifications to execute a lambda
I want to run a task once whenever a specific folder is modified in a bucket, no matter how many files are in the modification, it has to run once in that period of time.
The issue with the classic s3 ...
0
votes
1
answer
23
views
AWS Lambda Restrict Only Accessible By Bitbucket Webhooks
I want to restrict the access of my AWS Lambda Functions to be accessible only from Bitbucket Webhooks call. I have tried creating a Function URL but I can't seem to find how to add this restriction.
...
0
votes
0
answers
25
views
Laravel Vapor gives error : - The variables may not be greater than 2000 characters
I downloaded the env file from staging env using vapor env:pull staging and I updated it with my local env variables and then I run vapor env:push and then it gives me an error like:
The variables ...
-3
votes
2
answers
52
views
How to run lambda functions on-premises without Internet connection? [closed]
We have a cloud application that runs on AWS. This application consists of AWS Lambda functions and uses various AWS services, including S3, SQS, SNS, DynamoDB, Timestream, IoT Core (MQTT broker), ...
0
votes
0
answers
8
views
Cognito details not being passed to Lambda through AppSync
I'm creating an app that utilises Lambda that is called with AppSync (both setup within aws_cdk). In the Lambda's I need to use the logged in user (done via cognito) details within it to retrieve data ...
0
votes
1
answer
13
views
AWS API Gateway Lambda Reverse Proxy in Javascript calling Fetch and returning the response headers does not work
If you have and AWS API Gateway with a Lambda Reverse Proxy in Javascript calling Fetch and returning the response headers to the API-Gateway it does not work.
0
votes
0
answers
19
views
How to bypass Lambda Authorizer in API Gateway
I have a (public) API Gateway that uses a custom Lambda authorizer that we need to both (a) authorize custom access token and (b) JWTs.
We now want to trigger another Lambda (via EventBridge Scheduler)...
1
vote
0
answers
29
views
aws lamda connect to ssl-enabled postgresql RDS
I need use lambda function to interact with RDS. One of our postgresql db cluster has ssl enabled, so when using psycopg2-binary to make connection, it failed and googled/SO showed I have to use ...
0
votes
0
answers
18
views
Get File uploaded to AWS S3 bucket and read into Pillow to convert it
I have a Lambda Function which triggers when a file is uploaded to it's bucket. I want to
open said file with Pillow and convert it tp JPEG.
Code looks like this:
import os
import json
import boto3
...
0
votes
0
answers
13
views
Docker Push to AWS ECR Stuck on Preparing Layers
I'm trying to push a Docker image to AWS ECR, but the push operation gets stuck on the "Preparing" phase for several layers. Some layers are successfully pushed, but others seem to hang ...
0
votes
1
answer
16
views
CodePipeline Integration with on prem Bitbucket Server
Using steps in https://github.com/aws-samples/aws-codepipeline-bitbucket-integration am trying to integrate CodePipeline with on-premises Bitbucket Server.
When I push the code to repo am getting ...
0
votes
0
answers
13
views
Why is Node.js 20.x runtime in AWS Lambda not working with ffprobe?
I am trying to upgrade my lambda function from Node.js 16.x to 20.x. I am using ffprobe 6.1 in a lambda layer. The function returns the starting time code of a .ts video file. The function runs ...
0
votes
0
answers
19
views
missing ARNs for public AWS Lambda layers for aws-sdk
ChatGPT tells me this:
AWS provides a public layer containing the AWS SDK for JavaScript. You can use this layer in your Lambda function.
And that the public layer for AWS SDK for node.js 14.x in ...
-1
votes
0
answers
19
views
AWS Lamda event getting triggered multiple times
I am implementing a solution where whenever a new file is placed in S3 I am triggering an event in my lambda function which inserts the data further to AWS Athena.
But the issue is event is getting ...
-2
votes
0
answers
18
views
Rest api query string parameters encoding and decoding in lambda
question is : form the UI, we give the decoded lendername which should internally convert to encoded lendername and the decoded lendername should hit the database and fetch the requested JSON body.
...
0
votes
0
answers
8
views
Call Keycloak Rest API via Lambda AWS
I will summarize my workflow as follow:
One client Application (Mobile or Web Application)
Users will login these clients by calling a Lambda function Login via API Gateway
Within Login Lambda ...
0
votes
0
answers
29
views
How can i convert date in utc for get data from firebase collectionName in c#
its giving a result but in case of date filter range I'm doing some where mistake which i need to do please help me out
here is model AggregateModel
public string? collectionName { get; set; }
...
0
votes
0
answers
21
views
How to access environment variable in lambda function using Amplify Gen2
I am unable to access env variable in lambda function. So far:
I've read official docs and my project looks like follow:
I have function defined as follows:
export const dailyNotification = ...
0
votes
1
answer
50
views
Amplify Gen 2: lambda function `No federated jwt` error
I have an Amplify app using Cognito for userpool authentication. Once a user has signed up and used the code sent via email (all Cognito functionality), they are passed to a custom form where ...
0
votes
1
answer
20
views
AWS lambda how do i pass in my global bundle.pem?
Im trying to write to my documentDB using aws lambda and when trying to connect to the db I need to verify the cert and need to pass in the global bundle.pem into the mongo uri but it cant detect it.
...
0
votes
0
answers
22
views
Slow lambda run times when using SharpJS
I have an AWS Object Lambda in Node 20.x that uses SharpJS to watermark and reduce an image size upon GET requests.
Code looks like this:
export const handler = async (event) => {
const start = ...
1
vote
0
answers
27
views
AWS Cognito API Delay Across Regions?
I am creating a Cognito Pre Sign-up lambda trigger using Python 3.11. I have noticed there's a delay between when the AdminCreateUser response is returned and when the user is actually created. I ...
0
votes
1
answer
41
views
How to mock response for request.get object in AWS Lambda deployed through localstack for local testing purpose
As per requirement I am doing the lambda testing locally using the LocalStack. I could able to deploy and invoke the lambda using localstack. But I get an error in the lambda handler code, as my code ...
-1
votes
0
answers
38
views
Api gateway invoking a lambda returns 403
I've recently migrated a local python script to lambda via aws cdk. It collects data from an public api endpoint. On my local machine this function works 100% of the time when it comes to status codes ...
0
votes
0
answers
19
views
AWS lambda:InvokeFunction AccessDeniedException
I am trying to call a python lambda function from within another lambda function using:
client = boto3.client('lambda')
response =
client.invoke(FunctionName=arn,InvocationType='RequestResponse',
...
1
vote
0
answers
22
views
Mongoose and AWS Lambda optimize connection
I built a lambda that reads and writes from a DB. Using Node JS and Mongoose for MongoDB (last versions).
Obviously, after few dozens of triggers, I get errors "unable to connect" or "...
1
vote
0
answers
26
views
AWS VPC: Lambda functions experiencing slow performance and timeouts
I recently modified my VPC configuration, and now I'm experiencing significant performance issues with my Lambda functions. Here's my current setup:
VPC Configuration:
4 subnets total:
3 subnets (eu-...
0
votes
1
answer
23
views
Access AWS RDS from Both LAMBDA and Locally
I created an AWS RDS Postgres instance and allowed public access. Initially, I successfully connected to it locally. Next, I set up a Lambda function and connected it to the RDS. I created an Internet ...
0
votes
1
answer
16
views
Avoid Adding a Resource Policy to Lambda While Creating EventBridge Rule Using CDK
Problem Statement:
I want to create n numbers of EventBridge Rules where the target resource is a Lambda using CDK. While creating the Rule, EventBridge automatically creates a resource policy for ...
0
votes
1
answer
25
views
Why is serverless including the stage name in the service's URL?
I have a project that uses httpApi (API Gateway V2). However, if I understand correctly, only version 1 of the API Gateway supports gzip compression.
Is that correct?
If so, this leaves me a bit ...
0
votes
0
answers
53
views
Error:Configuration file not found in directory “/” for command serverless config
I am deploying an Express.js application using the Serverless framework on AWS, but the command below is giving an error
Command :
$serverless config credentilas --provider aws --key XXXXXX --secret
...
0
votes
0
answers
47
views
AWS SQS – failed message clogs queue
I have a long running-task (10 minutes) executed via a lambda function. The visibility timeout for my (Standard) SQS queue is set to 15 minutes and the lambda event source for the queue has a max ...
0
votes
0
answers
32
views
Error in getting data from EventBridgeEvent
I have step function with lambda_1 as starting point.
This step function is going to be triggered when object is added to S3. I am getting the event and trying to fetch objectKey and bucket from that ...
-1
votes
1
answer
30
views
How to stop PHPSESSID changing with AWS Lambda/CloudFront?
I have a PHP application hosted on AWS Lambda, written in Symfony using Bref.
I've managed to make all the functionaly work with serverless but I have one problem.
Users can log in, but if they ...
0
votes
1
answer
24
views
Lambda Provisioned Concurrency showing 0 available. But I'm not using any
I have been using my AWS account for more than 4 months. Now, I need to create a Lambda function with provisioned concurrency. However, it gives the following error:
```The maximum allowed provisioned ...
0
votes
1
answer
58
views
Creating a schedule expression for eventbridge using terraform
I am creating resources on AWS using TF and running into an error while trying to create an event bridge scheduler.
Based on TF documentation itself,
schedule_expression = "rate(1 hours)"
...
1
vote
0
answers
26
views
AWS CloudWatch: cross region alarm notification aggregation
I have CloudWatch alarms across several different AWS accounts and several different Regions.
I would like all of these alarms' action notifications (e.g. "alarm X changed from state OK to In ...
0
votes
0
answers
18
views
AWS Lambda http.request get always timeout also if works properly
we have a strange situation, we created an AWS Lambda that make an HTTP POST (with JSON body) using http.request, below the code:
export const handler = (event, context, callback) => {
console....
-4
votes
0
answers
16
views
Assistance Needed for Implementing Next.js and AWS Lambdas for Parts Public Search Migration [closed]
I am working on a project to migrate the "Parts Public Search" landing page from ASP.NET (no longer need it) to a new architecture using Next.js for the frontend and AWS Lambdas (Python) for ...
0
votes
1
answer
16
views
error while performing dynamo.query(params); from lambda function
When performing body = await dynamo.query(params); from a lambda function, i am getting response as :
"statusCode": "400",
"body": "User: arn:aws:sts::891377999999:...