aws-sdk 2.1549.0 → 2.1551.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/core.js CHANGED
@@ -20,7 +20,7 @@ AWS.util.update(AWS, {
20
20
  /**
21
21
  * @constant
22
22
  */
23
- VERSION: '2.1549.0',
23
+ VERSION: '2.1551.0',
24
24
 
25
25
  /**
26
26
  * @api private
@@ -1,10 +1,13 @@
1
+ var fs = require('fs');
2
+
1
3
  var AWS = require('../core'),
2
4
  ENV_RELATIVE_URI = 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI',
3
5
  ENV_FULL_URI = 'AWS_CONTAINER_CREDENTIALS_FULL_URI',
4
6
  ENV_AUTH_TOKEN = 'AWS_CONTAINER_AUTHORIZATION_TOKEN',
7
+ ENV_AUTH_TOKEN_FILE = 'AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE',
5
8
  FULL_URI_UNRESTRICTED_PROTOCOLS = ['https:'],
6
9
  FULL_URI_ALLOWED_PROTOCOLS = ['http:', 'https:'],
7
- FULL_URI_ALLOWED_HOSTNAMES = ['localhost', '127.0.0.1'],
10
+ FULL_URI_ALLOWED_HOSTNAMES = ['localhost', '127.0.0.1', '169.254.170.23'],
8
11
  RELATIVE_URI_HOST = '169.254.170.2';
9
12
 
10
13
  /**
@@ -113,7 +116,16 @@ AWS.RemoteCredentials = AWS.util.inherit(AWS.Credentials, {
113
116
  * @api private
114
117
  */
115
118
  getECSAuthToken: function getECSAuthToken() {
116
- if (process && process.env && process.env[ENV_FULL_URI]) {
119
+ if (process && process.env && (process.env[ENV_FULL_URI] || process.env[ENV_AUTH_TOKEN_FILE])) {
120
+ if (!process.env[ENV_AUTH_TOKEN] && process.env[ENV_AUTH_TOKEN_FILE]) {
121
+ try {
122
+ var data = fs.readFileSync(process.env[ENV_AUTH_TOKEN_FILE]).toString();
123
+ return data;
124
+ } catch (error) {
125
+ console.error('Error reading token file:', error);
126
+ throw error; // Re-throw the error to propagate it
127
+ }
128
+ }
117
129
  return process.env[ENV_AUTH_TOKEN];
118
130
  }
119
131
  },
@@ -3535,7 +3535,7 @@ export namespace DocumentClient {
3535
3535
  */
3536
3536
  GlobalSecondaryIndexUpdates?: GlobalSecondaryIndexUpdateList;
3537
3537
  /**
3538
- * Represents the DynamoDB Streams configuration for the table. You receive a ResourceInUseException if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.
3538
+ * Represents the DynamoDB Streams configuration for the table. You receive a ValidationException if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.
3539
3539
  */
3540
3540
  StreamSpecification?: StreamSpecification;
3541
3541
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aws-sdk",
3
3
  "description": "AWS SDK for JavaScript",
4
- "version": "2.1549.0",
4
+ "version": "2.1551.0",
5
5
  "author": {
6
6
  "name": "Amazon Web Services",
7
7
  "email": "",