get profile name even if profile path exists

This commit is contained in:
Joshua Semar 2015-10-27 21:30:11 -05:00
parent 5e282683bf
commit 31767accac
1 changed files with 2 additions and 1 deletions

View File

@ -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]
} }