Readonly
accountAccount ID, e.g. "123456789"
Readonly
partitionPartition, e.g. "aws" or "aws-cn"
Readonly
regionRegion, e.g. "us-west-1"
Resource, e.g. "my_bucket/my_key" or "layer:my_layer:42"
Readonly
schemeScheme, e.g. "arn"
Readonly
serviceService, e.g. "dynamodb"
Get a parsed representation of the resource part. Note that this property cannot be mutated, but if resourcePart is mutated, resource will reflect the change.
ArnResource
Static
parseParse an ARN string into an Arn object
An Arn object, or null if the argument was invalid
ARN string
Optional
fail: falseWhether to throw instead of returning null
Parse an ARN string into an Arn object, throwing an error if invalid
An Arn object
Error
ARN string
Whether to throw instead of returning null
Generated using TypeDoc
Amazon Resource Names (ARNs) uniquely identify AWS resources.
The following are the general formats for ARNs; the specific components and values used depend on the AWS service. To use an ARN, replace the italicized text in the example with your own information.
arn:partition:service:region:account-id:resource-id arn:partition:service:region:account-id:resource-type/resource-id arn:partition:service:region:account-id:resource-type:resource-id
partition The partition that the resource is in. For standard AWS Regions, the partition is aws. If you have resources in other partitions, the partition is aws-partitionname. For example, the partition for resources in the China (Beijing) Region is aws-cn.
service The service namespace that identifies the AWS product (for example, Amazon S3, IAM, or Amazon RDS).
region The Region that the resource resides in. The ARNs for some resources do not require a Region, so this component might be omitted.
account-id The ID of the AWS account that owns the resource, without the hyphens. For example, 123456789012. The ARNs for some resources don't require an account number, so this component might be omitted.
resource or resource-type The content of this part of the ARN varies by service. A resource identifier can be the name or ID of the resource (for example, user/Bob or instance/i-1234567890abcdef0) or a resource path. For example, some resource identifiers include a parent resource (sub-resource-type/parent-resource/sub-resource) or a qualifier such as a version (resource-type:resource-name:qualifier).
https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html