When running a DescribeInstancesRequest I get a list of reservations. Each reservation contains a list of security groups and a list of instances.
So my question is: What criteria are instances grouped in reservations and can I count on the security groups returned by the reservation being the security groups of the instances in the reservation.
Reservation is basically a set of instances. These instances can share the same reservation ID if you launch them together.
Amazon documentations:
reservation-id - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request.
When launching an instance, you can launch multiple instances with one launch request. These instances then belong to one reservation. A reservation can be understood as an atomic launch of one or many instances.
Do not mistake reservations with reserved instances. These are completely different concepts.
As for your other question: Yes, the security group matches the group of each instance in the reservation (all belong to the same security groups).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With