Skip to content

A type for ARNs with the ability to parse/construct them #812

@jbg

Description

@jbg

Describe the feature

A type representing an Amazon Resource Name (ARN), with the ability to construct an ARN from constituent parts and encode it as a string, as well as the ability to parse a string into an ARN and access the parts in a type-safe manner.

Use Case

Some example uses:

  1. Parsing: The ECS API does not include the Task ID in the Task object that it returns from e.g. DescribeTasks. However, the log stream that ECS creates in Cloudwatch Logs has a name which is constructed from the Task ID. It is necessary to parse the Task ARN returned by the ECS API, in order to programmatically determine the name of the log stream corresponding to the task.
  2. Construction: It is frequently necessary to construct ARNs when building IAM policy statements.

Currently we are doing these with the aws-arn crate, but it has some quality issues, and it would seem better for the official AWS SDK to provide this functionality.

Proposed Solution

The structure in the existing aws-arn crate seems broadly reasonable, at least as a starting point.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

A note for the community

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions