I need to know if there is any difference between ArcGIS Enterprise (on premise) and ArcGIS Enterprise (Amazon Web Service) for reading feature layer by ArcGIS Maps SDK for JavaScript.
The following code in the screenshot shows how I am currently reading feature layers from ArcGIS Enterprise (technically Portal for ArcGIS) installed in a physical server (on premise): use portalItem ID and portal URL.
Is there any difference when I read feature layering from Portal for ArcGIS installed in Amazon Web Service ? Can I just write the same code as below?

I highly appreciate your help.
Thank you and best regards,
Eiji