Getting the client request domain from Lambda@Edge function

I’m trying do something like below for HTTP 301 redirect, so that web users will redirect to different news pages. if ((request.uri == “/news”) || (request.uri == “/news/”) && (request….

Uncaught exception in AWS lambda javascript

I am trying to elicit an intent from Amazon LEX through lambda but I was given an error calling uncaught exception. Would appreciate the help, my code is as follows: ‘use strict’; exports.handler = (…

How to send signed HTTP request from AWS Lambda to AppSync GraphQL?

I am not sure how to send signed http request do AppSync GraphQL endpoint. There is no library for do that in AWS. aws-amplify don’t work because works only in browser, not in Lambda function. aws-sdk for AppSync is only for admin usage, it doesn’t have methods for call user side api It is possible to make IAM signed HTTP request from AWS Lambda? (in some easy way) Answer i would recommend reading this article: Backend GraphQL: How to trigger an AWS AppSync mutation from AWS Lambda, quoting the author,, we’ve: GraphQL is routed over HTTPS. That means we

Change Woocommerce API functions to async/await using NodeJS in AWS Lambda

I am looking to change a couple of Woocommerce API calls so each function finishes before the next functions proceeds. However, I am unsure how to do this without breaking the specific Node Woocommerce API code. How can I change those two Woocommerce POST functions to Async/Await so it works with AWS Lambda? (I have included an existing await function currently used in AWS Lambda as a reference) Answer There’s a method called postAsync for async calls in WooCommerce, you can try something like: Every method can be used in a promified way just adding Async to the method

How to automatically zip files with Node.js and npm

Is there a way to automatically zip certain files at the build time with Node.js and npm? For example, I have a project, that file structure looks like this: Project/ –lib/ –node_modules/ –test/ -…