- Newest
- Most votes
- Most comments
Based on the available documentation, the Resource Groups Tagging API's GetResources operation is designed to return tagged resources in the specified AWS Region for the calling account. The behavior you're observing appears to be related to how the API represents shared resources from the perspective of the participant account.
The GetResources operation returns resources that are tagged or previously tagged in your account's context. When you tag a RAM-shared VPC from the participant account and then query it using GetResources, the API returns the resource with an ARN that reflects the calling account's perspective, even though the underlying resource is owned by a different account.
This behavior is consistent with the API's design principle of returning resources "for the account" making the call. The API focuses on returning resources that are accessible and tagged within the context of the calling account, rather than necessarily preserving the original owner's account ID in all cases.
However, I should note that the specific documentation about how GetResources handles RAM-shared resources and ARN formatting for cross-account shared resources is not explicitly detailed in the available sources. The core documentation focuses on the general behavior of returning tagged resources for the calling account and filtering capabilities, but doesn't specifically address the nuances of RAM-shared resource ARN representation.
For definitive clarification on whether this is intended behavior or a bug, and for any workarounds or best practices when working with RAM-shared resources in the Resource Groups Tagging API, I'd recommend opening a case in the AWS Support Center at https://console.aws.amazon.com/support/ where the support team can investigate this specific scenario with the service team and provide authoritative guidance.
Sources
GetResources - Resource Groups Tagging API
get_resources - botocore 1.43.15 documentation
get_resources - Boto3 1.43.15 documentation
Relevant content
asked 4 years ago
asked 8 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 5 years ago

From https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html :
Resource tagging API must return correct ARNs so I can use it in other API calls, using different API creds of another account. Obviously, ARN with previous caller account id won't work in API call with another account creds. Resource tagging API is first-party AWS service which should have access to owner id.