I have this piece of code that runs perfectly fine locally. But after I deployed it to AWS Lambda, it didn’t execute as expected, plus, it did not print any errors to CloudWatch for me to see what had happened. I assume that it was because of the async/await that caused it but it seems to be correct. Did anyone
Tag: aws-lambda
Why the following code takes more time locally?
I wrote the following lambda to move messages from queueA to queueB With lambda config of 256 MB it takes 19691ms and with 512 MB it takes 10171ms to move 1000 messages from queueA to queueB. However, on my local system when I run reprocess_messages(qA, qB) it takes around 2 mins to move messages from queueA to queueB. Does this
Javascript: How to specify http method with AWS Lambda.invoke()?
From AWS documentation: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html#invoke-property How do I specify http method, e.g. GET, POST, PUT, DELETE when calling lambda.invoke()? Answer lambda.invoke() invokes the Lambda function – HTTP methods are for invoking Amazon API Gateway routes, not a Lambda function. A Lambda function just takes in an event. Either call the Amazon API Gateway endpoint (which then invokes the Lambda), or just
AWS Lambda@Edge 502 LambdaValidationError in CloudFront for redirect
I have a lambda function which performs 301 redirect if it has uri that is generated using regex. On deploying the function and adding it to the cloudfront behaviors, when I go to to the url https:my-website/xyz/faq/max, eventhough I see the status of 301 for https:my-website/xyz/faq/max after correctly re-routing to https:my-website/contact, it shows 502 Error. It shows the same error
Nested async await function not executing in AWS Lambda Function
Problem: I have very little experience working with async await functions and I am trying to execute a nested async await function within an if-else statement that depends on a higher level async function to execute upon an event detection. I expect to get a successful http response back from the nested async function, but I continue getting a null
Getting error when executing a lambda function – Parameter “userId” has value with no field set
I guess I am making a silly coding mistake, but have been trying for more than a day. I am trying to insert records onto aurora table with the parameters received as a stream from dynamodb table. I cant seem to set the parameters on the params object correctly. I want the sql statement and the parameters on the params
How to send array of buffer data in aws-lambda payload?
I am working on functionality, where i needs to send array of buffer containing imageData In object along with some other fields, SAMPLE INPUT : I tried using JSON.stringify(payload) but it’s not working, might be the issue with buffer, i am not sure it’s converting back buffer properly or not. Answer A way to deal with this just pass payload
How do I know when an async aws lambda ends?
It will be easier to understand if you look at the image: I am coding using AWS Lambda in node.js. I tried referring to the code above, but it failed. A lambda invokes B lambda. And B lambda invokes many C lambdas asynchronously. How do I know that B lambda ends with C lambdas? I can’t do this so Lambda
Can we use GitLab as host for source code with AWS CDK pipeline?
I have a repository in GitLab (Lambda Functions) and want to work with the AWS CDK pipeline (https://aws.amazon.com/blogs/developer/cdk-pipelines-continuous-delivery-for-aws-cdk-applications) to develop CI/CD pipeline. In AWS CDK docs there is nowhere mention about Gitlab. Will really appreciate it if someone can confirm this. Answer Only Bitbucket, GitHub, GitHub Enterprise Server actions are supported natively with codepipelines at the moment. You will need
NodeJS 14.x – Native AWS Lambda Import/Export Support
I am looking to make use of the native import/export that comes with ES6. I am using Serverless Containers within AWS Lambda. I have my Dockerfile which looks like this: I then have an app directory with my application code. The app.js code looks like this: As you can see from this line import { success } from ‘./utils/log’; I