Hello, I have the following serveless.yaml file:
service: mongo-serverless
provider:
name: aws
runtime: nodejs4.3
stage: ${opt:stage}
profile: ${self:custom.profiles.self:provider.stage}
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:*
Resource: "*"
- Effect: Allow
Action:
- ec2:CreateNetworkInterface
- ec2:DescribeNetworkInterfaces
- ec2:DetachNetworkInterface
- ec2:DeleteNetworkInterface
Resource: "*"
- Effect: Allow
Action:
- s3:*
Resource: "*"
vpc:
securityGroupIds:
- sg-xxxx
subnetIds:
- subnet-xxxx
functions:
graphql:
handler: build/main.graphql
timeout: 12
events:
- http:
path: graphql
method: post
cors: true
both security group and subnets exists on my VPC but i am not able to make the serverless connect to mongo and get this error in the logs
module initialization error: Error
graphql function - is there a way to further test what is going on?