Comments (2)
Hello, thank you for the well-explained report.
Are you sure about the minimal reproducer? I don't have the same result, in my case the region defined in ~/.aws/config
is used.
The current implementation is:
- When instantiating a client, the configuration object is built.
- The configuration merge data from multiple source (env variables, .ini file, ...)
aws/src/Core/src/Configuration.php
Lines 111 to 119 in 7feeeb7
- It load .ini files here:
aws/src/Core/src/Configuration.php
Lines 217 to 237 in 7feeeb7
- multiple ini files are merged together here:
aws/src/Core/src/Credentials/IniFileLoader.php
Lines 62 to 73 in 7feeeb7
As expected, if the region is defined in ~/.aws/config
and credentials are defined in ~/.aws/credentials
then both file are merged, and region from ~/.aws/config
will be used.
Could you help to troubleshoot by dumping the configuration and checking if the region is set:
- in
src/Core/src/AbstractApi.php
dump the$configuration
at line 80 - in
src/Core/src/AbstractApi.php
dump the$region variable
at line 240
from aws.
Hi @jderusse !
Thank you for the hints, I've debugged this and found out that the project I'm working on had the following env set:
AWS_CONFIG_FILE=false
I now understand why the async-aws SDK behaved the way it did, since my ~/.aws/config file is not loaded.
What I'm not okay with is the fact that the official AWS SDK seemed to be just fine with this set as such.
I tracked this down to the following code on their side:
https://github.com/aws/aws-sdk-php/blob/master/src/AbstractConfigurationProvider.php#L106-L111
The function above calls getenv(self::ENV_CONFIG_FILE), which will return false (assuming AWS_CONFIG_FILE=false in env).
Thus, their if check fails and it goes into the return self::getHomeDir() .'/.aws/config';
below.
Not sure what to think on this one, I find the behaviour of async-aws to be more correct, but this difference is kind of a headache to debug and can potentially be very destructive when migrating from one sdk to another.
I'm curious what your thoughts are on this, I'm currently tempted to raise an issue in the official SDK about this.
from aws.
Related Issues (20)
- Update Item using async-aws DynamoDB is missing or what? HOT 2
- DynamoDB binary value encoding inconsistency HOT 1
- S3 Retain Date Incompatibility DateTime ISO8601
- DynamoDB query not working with ExclusiveStartKey HOT 1
- DynamoDB query not refecting results with ExclusiveStartKey HOT 5
- SSO authentication with token provider configuration not working HOT 1
- Support UploadPartCopy in async-aws/s3 HOT 2
- S3 ListObjectVersions HOT 2
- SQS Batch Publish Broken HOT 4
- Credentials expiration using InstanceProvider and SQS HOT 2
- Next release of media-convert should be 1.0 HOT 1
- Suspected DST-sensitivity in credential expiration logic HOT 2
- Retry to retrieve credentials if this fails during the credential refresh.
- [SQS] STRING_VALUE can not be converted to an Integer HOT 1
- [S3] Writing many files at once gives Could not contact remote server error HOT 1
- Instance of "Symfony\Component\HttpClient\Response\CurlResponse" is already consumed and cannot be managed by "Symfony\Component\HttpClient\RetryableHttpClient". A decorated client should not call any of the response's methods in its "request()" method. HOT 3
- AsyncAws/sqs error on parsing GetQueueUrlResult response HOT 4
- async-aws/s3 does not properly throw a NoSuchKey error for invalid keys in headObject
- async-aws/sqs: Message deletion not working with ElasticMQ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws.