1

I have a lambda that is placed inside a VPC, and I would like to connect to AWS Personalize to get recommended items.

Strangely enough, while I can ingest data via AWS Personalize's tracker without any issues, I keep getting timeout errors while trying to receive recommended items using the same official AWS library. If I move the lambda outside of the VPC, I can receive recommended items without any issues. However I need the lambda inside the VPC.

I notice there is no way to create a VPC Endpoint for Personalize.

How can I get recommended items from AWS Personalize inside a VPC?

Mark B
  • 183,023
  • 24
  • 297
  • 295
Papzeka
  • 43
  • 7

1 Answers1

1

Lambda functions inside a VPC do not get a public IP address. That means the only way for a Lambda function to access any resource that exists outside the VPC is to either configure VPC Endpoints to those outside resources, or use a NAT Gateway.

Since you pointed out that there is currently no VPC Endpoint support for AWS Personalize, you will have to configure the Lambda function to only run in VPC subnets with a route to a NAT Gateway.

Mark B
  • 183,023
  • 24
  • 297
  • 295