Questions tagged [aws-lambda]
AWS Lambda is a compute service that lets you run code without the overhead of managing servers. (Not to be confused with the [lambda] tag, which instead refers to a type of function).
31,080
questions
0
votes
0
answers
4
views
how to correctly include "PureCloudPlatformClientV2" dependencies in lambda function without layers
Im unable to use aPureCloudPlatformClientV2 library in my aws lambda function. I have tried researching about this but could not succeed.
I first create a new directory and have one .py file for my ...
0
votes
0
answers
15
views
JS files in dist folder throwing compile time error, every time i run gulp build command
currently i have been asked to look into an application which was developed around in 2017, this project is build to create AS lambda function using serverless framework 1, NodeJs , typescript , and ...
0
votes
0
answers
7
views
How can we disable AWS Alarms for Serverless warmup functions?
We're using Serverless to automate deployments of AWS lambdas and step functions. Amongst others, we use the following plugins:
serverless-plugin-warmup
serverless-plugin-aws-alerts
As a result we ...
0
votes
0
answers
9
views
AWS custom label rekognition
public List<CustomLabel> customLabel(MultipartFile file) throws IOException {
// ByteBuffer imageBytes = ByteBuffer.wrap(file.getBytes());
byte[] imageBytes = file.getBytes();
...
0
votes
1
answer
17
views
How to configure a Delete Route in API Gateway
I cannot figure out how to define a route in API Gateway for a delete method using terraform.
Here is my terraform code, the POST route works just fine.
When I try to apply terraform changes, I get ...
0
votes
0
answers
14
views
Unable to access return value of AWS Lambda (Typescript) in Contact Flow
Hope you are all doing well. I am reaching out to you all because I am having a problem with capturing a value that is returned from a Lambda in AWS. For now, I am just looking to capture the value ...
0
votes
1
answer
28
views
AWS VPC Endpoints - Not functioning
I am struggling to get my AWS VPC endpoints to work. I've missed something in the setup but cannot work it out.
I have a lambda that is triggered by an SQS entry, the lambda is within a VPC. The ...
1
vote
1
answer
21
views
How to change permissions in file system within aws lambda?
I am getting an permission error , executing a lamba function. error is => [Error 30] Read-only file system: '/home/sbx_user'
I'm using some python packages in my aws lamba , and i supposed one of ...
-2
votes
0
answers
21
views
Using a Windows EXE for an AWS Lambda or Azure Functions runtime [closed]
My goal is to use an EXE as an Azure Functions (or AWS Lambda) runtime. For this I will need a Linux container with Wine, my project files, the cloud interface library (that give Python, Node, ...
0
votes
1
answer
33
views
"errorMessage": "'httpMethod'", "errorType": "KeyError",
Trying to PATCH data into DynamoDB, GET and POST work just fine. when it comes to PATCH I'm getting this error
{
"errorMessage": "'path'",
"errorType": "...
0
votes
1
answer
25
views
i made Lambda function make a response from S3 but i dont know how to return the payload
I made ALB-lambda-S3 structure.
and i assign valid IAM at lambda
but at the Lamda function , i couldnt make a valid response .
and got 504 gateway error
to check by my self i added debugging code
...
0
votes
0
answers
15
views
What is the event Schema for CloudFront To Lambda Function URL
I'm using a Lambda function URL as the origin for a CloudFront distribution. FYI the Lambda function uses Go 1.20 (on provided.al2 and Arm64). Seems to work fine, but I CANNOT retrieve query ...
0
votes
1
answer
17
views
Invoke multiple lambda functions in a single eventbridge schedule
Is it possible to invoke multiple lambda functions in a single eventbridge schedule?
I want to invoke one lambda function for staging env and one for production env using the same schedule.
Seems ...
0
votes
0
answers
22
views
Skill doesn't trigger the lambda
I am in the US and I use the Alexa app on my phone.
I have created a skill with ID amzn1.ask.skill.cb02c2fe-37a1-4a37-b664-01fe31eead34
I have created a lambda with ARN arn:aws:lambda:us-east-1:...
0
votes
2
answers
25
views
How do I solve cyclic dependency error between RDS and Secrets Manager stacks in AWS CDK v2?
I understand that sometimes order makes or breaks CloudFormation templates, but this one shouldn't be a problem, or at least it's not obvious to me why I'm getting this error:
Error: '...
0
votes
0
answers
15
views
MongoDB Lambda search with diacritics works locally but not when deployed
I have this AWS Lambda function to search a Mongodb database for queries with diactrics:
module.exports.searchWithDiacritics = (event, context, callback) => {
context....
0
votes
0
answers
16
views
How to build Rubberband Library for AWS Lambda
I want to run rubberband cli in AWS Lambda, I tried the macos version of rubberband command-line utility using Layers but getting "cannot execute binary file".
I need help on how do i build ...
0
votes
1
answer
24
views
How to inform TypeScript compiler of required AWS API Gateway query string params
I have an API created in AWS API Gateway that consists of a single endpoint called /callback. This endpoint was created with a schema the defines the query string params:
export const schema = {
'...
0
votes
1
answer
20
views
Update Inconsistent on DynamoDB
I've implemented a lambda function. During testing, updating of the item's attribute seems inconsistent. Most of the time it won't update and seldom it will update.
Here's a snippet of my code.
const ...
0
votes
1
answer
33
views
How to put lambda function result payload in specific result path and keep all previous data
I pass the following json to AWS Lambda function
{
"level1": {
"level2_a": {
"data1": "data1",
"data2": "...
0
votes
0
answers
22
views
Restrict AWS Lambda function to one specific IAM Role
I've developed a Lambda function and want to grant invocation permission exclusively to a specific role dedicated to this Lambda. While there could be other roles in the account with invoke ...
0
votes
0
answers
19
views
Unable to validate Twilio incoming SMS webhook with AWS lambda
I'm trying to integrate my app with Twilio for SMS service.
I would like to get notified each time there is an incoming SMS message.
Here is what I did
1- I define a lambda and ApiGateway with proxy ...
2
votes
0
answers
24
views
How long before idle Lambda function transitions to Inactive state?
Following this AWS blog, I can see that
A function transitions to the Inactive state when it has been idle long enough for the Lambda service to reclaim the external resources that were configured ...
0
votes
0
answers
7
views
Getting Deployment Group Arn for LifecycleEventHookExecutionId in Lambda Event
I am trying to deploy a Lambda function with pre and post hook without using SAM.
import json
import boto3
import os
codedeploy = boto3.client('codedeploy')
def lambda_handler(event, context):
# ...
-1
votes
1
answer
39
views
Delete every 7 days folders on S3 bucket
How can I create a lifecycle rule that deletes every 7 days folders on the S3 Bucket? I already tried a rule that Expires current versions of objects but they are not being removed.
I checked these 2 ...
0
votes
0
answers
17
views
connection between azure private flexible postgres and aws lambda
need to connect azure flexible private postgresql and aws lambda ,so I used site to site VPN connection is up both sides,but while lambda function trying to connect with dB server private dns it ...
-1
votes
0
answers
21
views
Using Postman, how do I call a .NET AWS SAM Lambda function that's running locally in the Mock Test Tool?
I have a .NET 6 Visual Studio 2022 AWS Serverless application (SAM) running on my local machine via the Mock Lambda Test Tool. I built it using the AWS Toolkit and Powertools for AWS Lambda (.NET). ...
0
votes
0
answers
26
views
Amazon API Gateway sending event to Lambda with wrong structure. event.body is undefined
I have an API Gateway launching my Lambda function (not as a proxy integration). I have the following Mapping template:
{
"body": $input.json('$'),
"headers": {
#foreach($...
0
votes
0
answers
11
views
S3 Static Website AWS Lambda Fn Contact Form Blocked by CORS Policy
Purpose: Create AWS Lambda Function to enable Contact Form (HTML 5, Bootstrap 5, React or similar) to send contact information to a given email.
Conclusion: The Lambda Function works great, but I am ...
0
votes
0
answers
12
views
error loading @sparticuz/chromium-min from s3
I'm trying to use pupeteer in a lamda function with @sparticuz/chromium-min hosting the brotli files in an S3 bucket...
I create the S3 bucket via serverless framework and then upload the .tar file ...
1
vote
1
answer
25
views
AWS Lambda using Annotations framework for .NET - missing Role
I'm porting to AWS Lambda functions an entire .NET 6 web application, using AWS Lambda Annotations framework.
With each build, the Amazon.Lambda.Annotations package takes every annotated API method ...
0
votes
0
answers
11
views
Lambda to upload (.dcm)DICOM file into AWS S3 Bucket
So What I'm trying to do is that I have lambda in python takes, input as a base64 and convert that base64 into DICOM(.dcm) file. But I can't be able to upload DICOM(.dcm) file. My bucket is not public ...
0
votes
1
answer
21
views
LAMBDA not achieving expected concurrency with MSK Triggers
I've configured two services on AWS Lambda to trigger off an MSK (Amazon Managed Streaming for Apache Kafka) event source. Both services are supposed to handle messages from 100 partitions. However, ...
0
votes
0
answers
8
views
How to write a lambda function for the Map task in the sagemaker?
I have a machine learning model deployed in SageMaker, and I'm currently working on a process to handle multiple inputs for predictions. I understand that AWS Lambda can be used to implement a Map ...
0
votes
0
answers
16
views
SQS Min Batch size when triggering Lambda [duplicate]
I have an SQS queue that gets messages into it not very frequently. And I want to run a lambda when there are enough items in the queue to process (let's say 10).
Is there any way to trigger a lambda ...
0
votes
0
answers
7
views
HTTML to PDF conversion using pypetter in aws lambda
am using python 3.7 as runtime and pyppeteer along with dependencies for html to pdf conversion in lambda aws. The conversion is happening but styles are not getting as expected. attaching the html ...
0
votes
0
answers
29
views
How to use EC2 to replace the Lambda's timeout of 15 minutes? [closed]
I am very new to AWS. I have gone through the service - AWS Lambda and obtained some knowledge on that creating and executing Lambda function.
Currently I am researching all the possible services to ...
0
votes
0
answers
10
views
how to use multiple authentication in aws amplify using cognito
we are using cognito authentication in aws amplify which takes the username(email) and password for login.
how can a custom authentication be added along with the existing to support OTP based login.
...
0
votes
0
answers
34
views
python bypass 403 Client Error: Forbidden for url on AWS server (works locally)
[ISSUE]
I am trying to python request a link that has no issues from my PC, but fails when it's running on AWS. Any chance to bypass that ? I guess it is due to some kind of blacklist ? I checked the ...
0
votes
1
answer
25
views
ES6 imports from CDK-constructed NodeJs 20.x AWS Lambda with inline code
For e.g. quick and dirty listeners I've used lambdas on the Node.js 18.x. Now with Node.js 20.x I tried to ES6 imports etc but I can't get it to work since I've understood that I would have to
a) ...
-3
votes
0
answers
37
views
How do I import external libraries into AWS Lambda
I have been trying to import external libraries into AWS lambda and am running into a problem. Using the virtual environment method it is able to import library such as requests but when I try it for ...
0
votes
0
answers
47
views
How can I connect Oracle DB to lambda using the oracledb python module?
Our Oracle database , with version 12.1, is hosted on ec2 as a standalone DB. I am trying to access that server from another account. Using the python module oracleDB in Thin Mode, I wrote a script ...
0
votes
0
answers
42
views
Moving a Lambda function into a VPC causes it to error with `Phase: invoke Status: error Error Type: Runtime.Unknown`
I have a .Net 6 Lambda function that has a Hello World style endpoint that is running perfectly well. It is triggered by API Gateway in proxy mode. It currently is not deployed in a VPC. However, I ...
0
votes
1
answer
8
views
VSCoode - running aws lambda fails with NodejsNpmBuilder:Resolver does not find node or npm runtime, although SAM does
When running aws lambda with vscode run and debug I get Error: ValueError: Path resolution for runtime: nodejs18.x of binary: npm was not successful
buy when running with sam local start-api i don't ...
0
votes
0
answers
14
views
How to deploy Lambda as container image for multiple functions with shared libs
I am confused about deploying AWS Lambda as container image when there are multiple functions with shared libs.
One way is to package all the functions and the shared libs into a single image. For ...
0
votes
0
answers
17
views
I am getting error while invoking url from my api gateway to postman API.How can that be resolved? [closed]
I invoked the url from stages to postman API but i am getting as
message:null
As i am integrating postgresql with lambda I should be able to view the json contents and i am unable to view the ...
-2
votes
1
answer
40
views
Ways to implement a AWS lambda application for archiving files from file server [closed]
I would like to seek for advice on the ways to implement an AWS Lambda application (in our team's AWS account) for performing file archiving task.
Objective
To archive files hosted on a Windows Server ...
0
votes
1
answer
55
views
Lambda Function connection to RDS timing out (*Private Isolated Subnets only no NAT Gateway or IGW)
Does anyone know if it's possible to connect Lambda to RDS in the same VPC with just isolated subnets where both resources are in the same subnets? I've fiddled and searched far and wide for a few ...
0
votes
0
answers
12
views
How to troubleshoot [ERROR] Error: ('HY000', 'The driver did not supply an error!') in pyodbc
I'm working on extracting data from an external cloud-based source via a DataDirect Hybrid Data Pipeline ODBC Driver. The actual extraction is run through an AWS Lambda function that is invoked via ...
-1
votes
2
answers
36
views
aws lambda error when trying to access query parameters [closed]
I'm new to aws lambda, I created a function writen in python, i have aws api gateway as a trigger to my function.
the runtime is python 3.11
Now! here's the problem that i can't even explain:
import ...