get profile name even if profile path exists
This commit is contained in:
parent
5e282683bf
commit
31767accac
|
@ -1082,5 +1082,6 @@ func iamInstanceProfileArnToName(ip *ec2.IamInstanceProfile) string {
|
||||||
if ip == nil || ip.Arn == nil {
|
if ip == nil || ip.Arn == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return strings.Split(*ip.Arn, "/")[1]
|
parts := strings.Split(*ip.Arn, "/")
|
||||||
|
return parts[len(parts)-1]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue