Skip to content

AWS Lambda: Support Fn::Split in vpc.securityGroupIds and vpc.subnetIds configurations #8513

@vmj

Description

@vmj

sls produces correct CloudFormation, but issues a configuration warning. This has been discussed and fixed in issue #8282 but I guess Split function slipped the radar.

serverless.yml
service: hello-world
frameworkVersion: '2'

provider:
  name: aws
  runtime: nodejs12.x
  vpc:
    subnetIds: !Split
      - ','
      - "sn1,sn2"
    securityGroupIds: !Split
      - ','
      - "sg1,sg2"

functions:
  hello:
    handler: handler.hello
output
✔ ~/src/testing/serverless-fw/hello-world ➭ sls package
Serverless: Configuration warning:
Serverless:   at 'provider.vpc.securityGroupIds': should be array
Serverless:   at 'provider.vpc.subnetIds': should be array
Serverless:
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
Serverless:
Serverless: Packaging service...
Serverless: Excluding development dependencies...

Installed version

Framework Core: 2.11.1 (local)
Plugin: 4.1.2
SDK: 2.3.2
Components: 3.3.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions