I've got a lambda running in a VPC that is a connected to a Websocket API Gateway endpoint. It gets called just fine when the client connects and sends the websocket command, and is able to access resources (RDS) inside my VPC as well, however when I go to send a response via the AWS.ApiGatewayManagementApi postToConnection, I get a "Forbidden" error.
The Lambda's role has "execute-api:Invoke" permissions and the lambda itself is running a private subnet of the VPC with a NAT gateway and an interface endpoint linked to the "execute-api" service (before that was added calls to postToConnection would time out) so I'm stumped as to what permission I could still be missing.
Do I need to call a different endpoint than ".execute-api..amazonaws.com/"? This same codes works when run outside of the VPC.