Amazon Resource Name parser and validator library.
Amazon Resource Name (ARN) is Amazon's standard for identifying resources. Although there are Amazon specific components in it (eg. region), in most of the cases it perfectly fits.
This library provides a way to validate and parse ARNs.
Read about ARNs in the official documentation.
$ go get github.com/goph/arn
package main
import(
"fmt"
"github.com/goph/arn"
)
func main() {
resourceName, err := arn.Parse("arn:aws:rds:eu-west-1:123456789012:db:mysql-db")
if err != nil {
panic(err)
}
fmt.Println(resourceName.String())
}
The MIT License (MIT). Please see License File for more information.