AWS API Gateway Lambda RDS VPC and Auth0

Hello,

I have a NodeJS application running in AWS services. Currently, my lambda is able to connect to your jwks.json check token endpoint. However, when I add settings to allow Lambda to connect to my RDS database, it fails to connect to the jwks.json endpoint.

I’m using the serverless.yml (from serverless.com) to assist for deployment.

I have it as follows (slim version):

service: cool-project
provider:
  name: aws
  runtime: nodejs12.x
  stage: dev
  region: us-east-1
  vpc:
    securityGroupIds:
      - sg-xxxxxxxx
    subnetIds:
      - subnet-11111111
      - subnet-22222222
      - subnet-33333333
      - subnet-44444444
      - subnet-55555555
      - subnet-66666666
functions:
  web:
    handler: index.handler
    events:
      - http: "ANY /"
      - http: "ANY /{proxy+}"

To summarize, without the VPC settings, Lambda won’t connect to RDS, but JWT checking works. When adding VPC settings, Lambda is able to connect to RDS, but JWT checking fails.

Has anyone else faced this?

Cheers!

1 Like

Hello,

We are experiencing the exact same issue, any help would be appreciated!