VpcConfig
Configures the VPC settings for a capacity provider, including the subnets and security groups where EC2 instances will be launched.
Syntax
To declare this entity in your AWS Serverless Application Model (AWS SAM) template, use the following syntax.
YAML
SubnetIds:ListSecurityGroupIds:List
Properties
-
SubnetIds -
A list of subnet IDs where EC2 instances will be launched. At least one subnet must be specified.
Type: List
Required: Yes
CloudFormation compatibility: This property is passed directly to the
SubnetIdsproperty of anAWS::Lambda::CapacityProviderresource. -
SecurityGroupIds -
A list of security group IDs to associate with the EC2 instances. If not specified, the default security group for the VPC will be used.
Type: List
Required: No
CloudFormation compatibility: This property is passed directly to the
SecurityGroupIdsproperty of anAWS::Lambda::CapacityProviderresource.
Examples
VPC configuration
The following example shows a VPC configuration with multiple subnets and security groups.
VpcConfig: SubnetIds: -subnet-12345678-subnet-87654321SecurityGroupIds: -sg-12345678-sg-87654321