After transitioning our staging environment for the REST API from NodeJS 8.x to NodeJS 12.x on AWS Lambda due to end of life for NodeJS 8.x runtime, we have encountered a new issue. Periodically, requests from our frontend web app to API Gateway fail with ...
I have been attempting to upload an image file to S3 through API Gateway. The process involves a POST method where the body accepts the image file using form-data. I crafted the lambda function in TypeScript utilizing the lambda-multipart-parser. While it ...
I've been experimenting with AWS Lambda functions, Axios, and Cheerio in a demo project. However, when I call the endpoint, I receive an error message saying {message: Internal Server Error} exports.lambdaHandler = async (event, context) => { try ...
I'm currently grappling with understanding how the compression nodejs library operates and why it's causing issues in my specific scenario. The code I've developed is intended to be executed on AWS Lambda running nodejs 6.10. Below is my index.js file whi ...
I'm facing an issue in vscode while trying to access the MethodResponse interface from apigateway. Unfortunately, I'm getting an error message: The type 'typeof import(".../node_modules/aws-cdk-lib/aws-apigateway/index")' does not have a prope ...
Currently, I am facing an issue with deploying an API for use in Front End. The API functions properly when tested alone, but it returns a CORS error when integrated into a Vue app. The specific error message is as follows: Access to XMLHttpRequest at &a ...
Looking to scrape websites using selenium. Successfully implemented selenium on ec2, but since ec2 is tied to a specific IP, I'm interested in incorporating Amazon API Gateway rotating proxy into my python selenium script. Came across this helpful t ...
I'm working with a node lambda function and looking to decode and access the payload of a jwt. My approach involved setting up a get method with lambda proxy integration enabled, passing only the authorization bearer-token to the endpoint. However, I ...
I am currently working with example Objects that follow this interface structure: interface Car{ id: Number; name: String; tires: Wheel[] } interface Wheel{ id: Number; name: String; radius: Number; } My goal is to store these Car Objects in DynamoDB and ...
I'm in the process of integrating a Lambda authorizer into my REST API using AWS CDK. const api = new apigw.RestApi(this, 'apiname', { defaultCorsPreflightOptions: { allowOrigins: apigw.Cors.ALL_ORIGINS } }); const authorizerFuncti ...
My Lambda Function module.exports.handler = async(event, context, callback) => { return { statusCode: 200, headers: { "Access-Control-Allow-Credentials" : 'true', 'Access-Control-Allow-Origin': 'mydomai ...
I am facing a challenge with my application which has different environments (dev, stage, prod) and I am utilizing AWS Codepipeline for the CI/CD process. Each environment requires different buildspec.yml and template.yaml files. The issue arises with AP ...
Apologies for my novice question, but I am still getting the hang of AWS, NodeJS, and Express. I am in the process of setting up a simple serverless API Gateway: index.js import AwsServerlessExpress from 'aws-serverless-express'; import App fr ...
In the process of constructing an application, I am utilizing ReactJS for the front-end and AWS API Gateway/AWS Lambda in NodeJS for the back-end. The form data from my React app is being passed within the userAttributes attribute as illustrated below: ht ...
Looking for advice on converting this Express.js function to AWS Lambda for Node.js 18. const upload = multer() // Write received chunk to S3 bucket app.post('/upload', upload.single("file"), (req, res) => { const { index, fileName } = req. ...
I am trying to send a custom error message in JSON format from my express app, which is served in a lambda function using serverless-http To achieve this, it seems I need to utilize LAMBDA_PROXY APIG integration to enable sending custom error messages dir ...
My backend API services are hosted on AWS using API Gateway and EC2 instance. The backend is built with Node.js/Express JS, and socket.io is used for real-time messaging. const initializeExpress = (): void => { const app = express(); let http = re ...
My HTML file contains JavaScript, along with a URL that displays data retrieved from an AWS lambda API call via AWS API Gateway. The page initially appears blank and the data is structured like this: [ {"user": "bob", "groups": ["bobsGroup"], "policies": ...
After successfully setting up my API gateway and connecting it to my lambda function, I specified the URL as {id} with the intention of passing this parameter into the lambda. Despite numerous attempts using both the default template and a custom one for ...
Utilizing Lambda, API-gateway, and DynamoDB with Python 3.6 for managing orders. I have a DynamoDB table structured as follows: orderId (primary Key|String) orderStatus (String) orderCode (String) date (String) The orderId field is unique. However, when ...
I am working with an Api Gateway Rest Api that is protected by Cognito Authorizer and integrated via VPCLink to access my container hosting a NodeJs Express app. The complete flow looks like this: Api Gateway -> VPCLink -> NLB (Network Load Balance ...
I am facing an issue when invoking a lambda that sends data to clients through the websocket API. Instead of sending the actual message or payload, it only sends the last received message. For example: Lambda 1 triggers Lambda 2 with the payload "test1" ...
After setting up my API with the AWS Api Gateway Service, I am now looking to integrate the javascript SDK into a basic webpage. The provided instructions for using the javascript SDK can be found here. However, they mention importing a js file named apig ...