diff --git a/lib/aws.js b/lib/aws.js
index <HASH>..<HASH> 100644
--- a/lib/aws.js
+++ b/lib/aws.js
@@ -29,7 +29,7 @@ AWS.CredentialProviderChain.defaultProviders = [
   function () { return new AWS.EnvironmentCredentials('AMAZON'); },
   function () { return new AWS.SharedIniFileCredentials(); },
   function () {
-    if (AWS.ECSCredentials.prototype.getECSRelativeUri() !== undefined) {
+    if (AWS.ECSCredentials.getECSRelativeUri() !== undefined) {
       return new AWS.ECSCredentials();
     }
     return new AWS.EC2MetadataCredentials();
diff --git a/lib/credentials/ecs_credentials.js b/lib/credentials/ecs_credentials.js
index <HASH>..<HASH> 100644
--- a/lib/credentials/ecs_credentials.js
+++ b/lib/credentials/ecs_credentials.js
@@ -140,3 +140,8 @@ AWS.ECSCredentials = AWS.util.inherit(AWS.Credentials, {
     });
   }
 });
+
+/**
+ * @api private
+ */
+AWS.ECSCredentials.getECSRelativeUri = AWS.ECSCredentials.prototype.getECSRelativeUri;
Adds reference to getECSRelativeUri function on the ECSCredentials constructor