Colin Cheung
11/03/2021, 3:50 PM// Import VPC
const existingVpc = ec2.Vpc.fromLookup(this, "VPC", {
vpcId: "vpc-XYZ",
});
// Sample function to connect function to VPC
function: {
handler: "src/claim/index.handler",
permissions: claimPermissions,
vpc: existingVpc,
allowPublicSubnet: true,
},
I can see that the VPC is correctly attached in AWS console on the lambda page, but running lambda causes it to timeoutthdxr
11/03/2021, 3:51 PMthdxr
11/03/2021, 3:51 PMapp.local ? vpc : undefined
thdxr
11/03/2021, 3:52 PMsst deploy
it's likely there's a misconfiguration in the security groupsColin Cheung
11/03/2021, 3:53 PMsst start
Colin Cheung
11/03/2021, 3:53 PMthdxr
11/03/2021, 3:55 PMColin Cheung
11/03/2021, 6:21 PMsst deploy
works, will try and see if I can setup a VPN connection as described here but it seems a bit complex
Thanks again for the help!Frank
Colin Cheung
11/04/2021, 9:43 AMColin Cheung
11/04/2021, 12:51 PMsst start
and checking cloudwatch the only log is connectAndSendMessage()
The only thing I didn't do in the guide was to setup DNS resolvers for the VPC Client Endpoint as that really confused the heck out of me, not sure if that has anything to do with itFrank
allowPublicSubnet
is set to true
. The Lambda function can’t access the internet, hence can’t connect to the websocket server.Frank
Colin Cheung
11/05/2021, 3:31 PMFrank
Frank
thdxr
11/05/2021, 3:52 PMthdxr
11/05/2021, 3:52 PMthdxr
11/05/2021, 3:52 PMSeth Geoghegan
11/11/2021, 12:31 AMSeth Geoghegan
11/11/2021, 12:32 AMSeth Geoghegan
11/11/2021, 12:42 AM