Security group and submit belong to 2 different networks

I am trying to run a ray cluster with ec2 with aws… I receive an error message…

Acquiring an up-to-date head node
create_instances: Attempt failed with An error occurred (InvalidParameter) when calling the RunInstances operation: Security group sg-1 and subnet subnet-2 belong to different networks., retrying.
create_instances: Attempt failed with An error occurred (InvalidAMIID.NotFound) when calling the RunInstances operation: The image id ‘[ami-0a2363a9cff180a64]’ does not exist, retrying.
create_instances: Attempt failed with An error occurred (InvalidParameter) when calling the RunInstances operation: Security group sg-1 and subnet subnet-2 belong to different networks., retrying.
create_instances: Attempt failed with An error occurred (InvalidParameter) when calling the RunInstances operation: Security group sg-1 and subnet subnet-2 belong to different networks., retrying.

It gives me some feeling that it’s a was config issue. Could you check this link and see whether it got fixed or not,

The subnet I was deploying into didn’t have auto assign public IPs enabled. As such, I updated the aws_instance to include the subnet_id and associate_public_ip_address :slight_smile: