I am unable to get the YAML correct for the vpc configuration of a function. I have tried multiple iterations of the config lines by adding the vpc section in both the provider: and the function: sections. In both cases, I continue to get errors on deploy during validation of the serverless.yml file. The messages vary between ‘bad indentation of a sequence entry’ and ‘end of the stream or a document separator is expected’ and ‘can not read a block mapping entry; a multiline key may not be an implicit key’. I have followed the documentation as follows:
provider:
name: aws
vpc:
securityGroupIds:
- sg-2a88d852
subnetIds:
- subnet-f2c23e96
Does someone have a valid vpc config at the provider or function level? I have tried all manner of spaces after colons and removing spaces. I have wrapped sg and subnets in quotes and dbl-quotes. I have even moved the gd-id up to the save level as the title ‘securityGroupIds: sg-2a88d852’ and this seems to accept the single value, but still errors on the subnetIds. Help…