You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLDR: Route53's API specs from AWS are inconsistent with the resource IDs. Some return /hostedzone/abcd1234567 others return abc1234567
It appears most apis from AWS only accept the true ID and not the /%resource_type%/ prefix. Take for instance list_tags_for_resources if you provide the full id /hostedzone/abcd1234567 the resource is not found or the ID parameter greater than the allowed character limit for the aws cli.
This same API's response returns the shorter resource id 'ResourceTagSets': [{'ResourceType': 'hostedzone', 'ResourceId': 'AVGQ56HKPAQLME0', 'Tags': [{'Key': 'Deploy', 'Value': 'True'}, {'Key': 'Name', 'Value': 'UnitTest'}]}]}
A counter example is list_hosted_zones, it return the longer resource id /hostedzone/abcd1234567
It seems the route53 implementation may need some refactoring. As a short term fix, perhaps we can accept both "ID" styles and handle appropriately? Unfortunately the AWS docs don't show which form is returned...
The issue is you cannot simply take the ID from the create and use it with other api endpoints. You must parse out the ID from the longer form.
Well, that's a pain, and definitely weird behaviour!
As a short term fix, perhaps we can accept both "ID" styles and handle appropriately?
Absolutely, that's probably the best way forward.
If/when we determine the exact rules when short resource ID is used/accepted, and when the long version, we can always think about a more thorough refactor. But for now - maximum flexibility in what Moto accepts is best IMO.
I'll try to add more info over next few days.
TLDR: Route53's API specs from AWS are inconsistent with the resource IDs. Some return
/hostedzone/abcd1234567
others returnabc1234567
It appears most apis from AWS only accept the true ID and not the
/%resource_type%/
prefix. Take for instancelist_tags_for_resources
if you provide the full id/hostedzone/abcd1234567
the resource is not found or the ID parameter greater than the allowed character limit for the aws cli.This same API's response returns the shorter resource id
'ResourceTagSets': [{'ResourceType': 'hostedzone', 'ResourceId': 'AVGQ56HKPAQLME0', 'Tags': [{'Key': 'Deploy', 'Value': 'True'}, {'Key': 'Name', 'Value': 'UnitTest'}]}]}
A counter example is list_hosted_zones, it return the longer resource id
/hostedzone/abcd1234567
It seems the route53 implementation may need some refactoring. As a short term fix, perhaps we can accept both "ID" styles and handle appropriately? Unfortunately the AWS docs don't show which form is returned...
The issue is you cannot simply take the ID from the create and use it with other api endpoints. You must parse out the ID from the longer form.
@bblommers thoughts?
The text was updated successfully, but these errors were encountered: