Skip to content

Commit e810d4e

Browse files
authored
Add endpoint URL env variable to fallback options (#1666)
* Add endpoint URL env variable to fallback options * Add changelog for added env variable support * Update branch alias * Add unit test for endpoint env variable * Replace dedicated test with existing provider case
1 parent 2ea6be2 commit e810d4e

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- Support for AWS_ENDPOINT_URL environment variable
8+
59
## 1.20.1
610

711
### Changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"extra": {
4040
"branch-alias": {
41-
"dev-master": "1.20-dev"
41+
"dev-master": "1.21-dev"
4242
}
4343
}
4444
}

src/Configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ final class Configuration
6666
],
6767
[self::OPTION_SHARED_CREDENTIALS_FILE => 'AWS_SHARED_CREDENTIALS_FILE'],
6868
[self::OPTION_SHARED_CONFIG_FILE => 'AWS_CONFIG_FILE'],
69+
[self::OPTION_ENDPOINT => 'AWS_ENDPOINT_URL'],
6970
[
7071
self::OPTION_ROLE_ARN => 'AWS_ROLE_ARN',
7172
self::OPTION_WEB_IDENTITY_TOKEN_FILE => 'AWS_WEB_IDENTITY_TOKEN_FILE',

tests/Unit/ConfigurationTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public function provideConfiguration(): iterable
7070

7171
yield 'default when env missing' => [[], [], ['profile' => 'default']];
7272
yield 'fallback env' => [[], ['AWS_PROFILE' => 'foo'], ['profile' => 'foo']];
73+
yield 'fallback endpoint env' => [[], ['AWS_ENDPOINT_URL' => 'http://localhost:4566'], ['endpoint' => 'http://localhost:4566']];
7374
yield 'config priority on env' => [['profile' => 'bar'], ['AWS_PROFILE' => 'foo'], ['profile' => 'bar']];
7475

7576
yield 'config with env group' => [['accessKeyId' => 'key'], [], ['accessKeyId' => 'key', 'sessionToken' => null]];

0 commit comments

Comments
 (0)