Skip to content

Commit 35cefaf

Browse files
Changed steps how to set vpc settings
1 parent 4e2ee4f commit 35cefaf

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,7 @@ Achieving this can be a bit confusing if you're new to VPCs. When you create you
7070

7171
If you want to learn more, here's some more info on [VPCs in the context of RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html) and on [security groups](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html).
7272

73-
Now, we just have to make sure that our Lambda is created within our VPC as well. For that just add the following to the specifications of your `graphql` function in your `serverless.yml` file:
74-
75-
```
76-
vpc:
77-
securityGroupIds:
78-
- sg-123456
79-
subnetIds:
80-
- subnet-123
81-
- subnet-456
82-
- subnet-789
83-
```
84-
85-
You can find all these values in the RDS console under "Connectivity & Security". (As the securityGroupId it's enough to use the `default` one: this basically makes the Lambda function part of the VPC.)
73+
Now, we just have to make sure that our Lambda is created within our VPC as well. For that just edit the AWS_VPC environment variables in the `.env.template` and they will be used in the `vpc` section of the `serverless.yml` file. You can find all these values in the RDS console under "Connectivity & Security". (As the securityGroupId it's enough to use the `default` one: this basically makes the Lambda function part of the VPC. There should be 3 subnetIds.)
8674

8775
(You will also need to add `"iam:AttachRolePolicy"` to the permissions of the Serverless IAM role policy you will later create.)
8876

0 commit comments

Comments
 (0)