I am currently researching API Gateway (websocket) + Lambda + RDS (via RDS Proxy) for my project, and when I set up VPC on Lambda to connect to the database via RDS Proxy, I no longer get messages from Lambda.
Will Lambda in VPC not be able to reply to messages via API Gateway (websocket)?
The message reply from Lambda is as follows:The language is TypeScript
constapiGateway=newApiGatewayManagementApi({
apiVersion: '2018-11-29',
endpoint —event.requestContext.domainName+'/'+event.requestContext.stage
});
wait apiGateway.postToConnection({
ConnectionId: event.requestContext.connectionId,
Data: 'data'
} as ApiGatewayManagementApi.PostToConnectionRequest).promise();
I was able to return the message above until I set up VPC in Lambda.
When I checked the CloudWatch log, it seems that the processing has not progressed since I called postToConnection
, and it has timed out, and the following log is output:
2022-00-00:00:00.280Z 10xx0xx5-9821-4x02-8x05-1x588x7x460x Task timed out after 5.02 seconds
I'm not very familiar with the network, and I'm trying to set the security group inbound and outbound to pass all traffic, or I'm trying to set the subnet with public, but it hasn't changed.
Please let me know if there are any countermeasures.
As for the configuration, the customer wants to develop it with this configuration as much as possible.
aws-lambda websocket vpc
The same thing happened.After connecting to the RDS and retrieving the data through lambda in the VPC, I passed the data to lambda that did not set up the VPC and made it run.The lambda is responding by sending out WebSocket.
I would like to know if there is any other good way.
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.