Now we will use the IAM Roles that we created earlier to assign to two EC2 instances.
Go to the EC2 management console and access the list of EC2 instances.
dev-ec2
DevEC2
Next, for this same EC2 instance, we will adjust the settings to retrieve metadata from the EC2 instance.
Similarly, we will perform the same steps for the EC2 instance imga-server
imga-server
ProdEC2
Next, we will adjust the settings to retrieve metadata from the EC2 instance.
The remaining steps are exactly the same as for dev-ec2
. At this point, we can ensure that both EC2 instances can communicate with each other and use the necessary services reliably.