Question:
I found couple mentions of limits in the documentation:
apigateway – ARN length of a method with authorization 1600 bytes
API_Role – Maximum length of 2048
But is it possible to get ARN with 4000 characters or even more?
I need this to store in local DB, and I don’t want to use something like MaxValue.
Answer:
I am not aware of any official source specifying a maximum possible length of an ARN. ARNs are primarily constrained by the length constraints on their componenents, specifically the resource, which varies in format and content from service to service. 2048 seems like a very safe value, as it is difficult if not impossible to imaging a circumstance where an ARN would need to be that long.
See Amazon Resource Names (ARNs) and AWS Service Namespaces for typical example ARNs. If there were a meaningful global maximum size of ARNs, this is where it should have been documented.