Currently, the implementation uses the default VPC_ID for each region when launching EC2 instances. This behavior limits flexibility, as instances may need to be launched in non-default VPCs depending on the network requirements and configurations for specific regions.
The goal is to allow specifying a custom VPC_ID for each region when creating EC2 instances, overriding the default VPC configuration where needed. This will provide better control over network configurations across different AWS regions.
Requirements:
Add support for specifying a custom VPC_ID for each region where instances are being launched.
If no custom VPC_ID is provided for a region, continue using the default VPC for that region.
Ensure proper validation for the VPC_ID to check whether it is valid and available in the specified region.
Possible Solutions:
Extend the current EC2 instance creation logic to accept a VPC_ID parameter specific to each region.
If a custom VPC_ID is specified, ensure that the instance is launched within that VPC.
Implement validation to ensure that the VPC_ID exists and is properly configured for the region.
If no VPC_ID is provided, use the default VPC and log that the default is being used.
Description:
Currently, the implementation uses the default
VPC_ID
for each region when launching EC2 instances. This behavior limits flexibility, as instances may need to be launched in non-default VPCs depending on the network requirements and configurations for specific regions.The goal is to allow specifying a custom
VPC_ID
for each region when creating EC2 instances, overriding the default VPC configuration where needed. This will provide better control over network configurations across different AWS regions.Requirements:
VPC_ID
for each region where instances are being launched.VPC_ID
is provided for a region, continue using the default VPC for that region.VPC_ID
to check whether it is valid and available in the specified region.Possible Solutions:
VPC_ID
parameter specific to each region.VPC_ID
is specified, ensure that the instance is launched within that VPC.VPC_ID
exists and is properly configured for the region.VPC_ID
is provided, use the default VPC and log that the default is being used.