aws / aws-app-mesh-examples

AWS App Mesh is a service mesh that you can use with your microservices to manage service to service communication.
MIT No Attribution
864 stars 395 forks source link

Fix INSTANCE_PROFILE_NAME not found issue #523

Closed ysdongAmazon closed 1 year ago

ysdongAmazon commented 1 year ago

The problem is that INSTANCE_PROFILE_NAME no longer contains INSTANCE_PROFILE_PREFIX, so we cannot directly get the INSTANCE_PROFILE_NAME from it anymore. Therefore, we need to first find the INSTANCE_ID of any EC2 instance in the auto-scaling group by INSTANCE_PROFILE_PREFIX, and get the INSTANCE_PROFILE ARN associate with it. Then, extract the INSTANCE_PROFILE_NAME from the ARN (IAM must use the name for CLI searching), and we can continue to get the ROLE_NAME through the INSTANCE_PROFILE_NAME.

image