Skip to content
Advertisement

Tag: aws-lambda

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

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

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

Advertisement