Is anyone using vpc_config?


#1

Hi guys,

We’re trying to deploy our endpoints and they need to connect to a RDS database under a VPC.

The issue is, when we try to add the vpc_config with security_group_ids and subnet_ids, it fails to create the lambdas.

We tried also to set a config.function.role with VPC permission but it’s still failing without a clear error message.

Is anyone having the same issue?

Thanks


#2

Know this person was using vpc_config Error after activate VPC in a Rails app: "errorType": "Init<Seahorse::Client::NetworkingError>", His issue was resolved by adding NAT Gateways to his private subnets. Essentially, that subnets that you are configuring need access to the internet. It needs this because the functions need to communicate with the AWS Lambda service.


#3

Can we set up VPC config within Jets and have jets deploy set them in the Lambda?
I notice that a jets deploy can take away the VPC settings, and post-deploy I have to manually set these.

Also, if jets deploy supported this, we could spin up a new stack easily.


#4

Believe vpc_config is a function property. So should be able to set it with Jets Function Properties


#5

Thank you! - worked like a charm.
I used properties

properties(vpc_config: {
“SecurityGroupIds” => [ “xxxxxxxx” ],
“SubnetIds” => [ “aaaa”, “bbbb”, “cccc” ]
})


#6

Cool. You should also be able to use the convenience vpc_config method to make it a little more concise.

vpc_config(
  security_group_ids: [ "xxxxxxxx" ],
  subnet_ids: [ "aaaa", "bbbb", "cccc" ]
)

Running migrations with "jets deploy" command