-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Configure Services' Endpoint URLs via Environment Variables #1239
Comments
As a heads up, I am starting a PR to provide an implementation of this |
@bradynpoulsen You can provide the endpoint as part of the client. Please have a look at the documentation here: https://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html#endpoint We would like to know more about your scenario and why would you prefer setting up endpoints as environment variable. |
We have 2 different use cases right now.
Maybe it's just me, but it feel inconsistent to allow key things (credentials/environment) to easily be configured through environment variables, but then prevent something like the endpoint configuration from being allowed. |
…h environment variables
@bradynpoulsen Hi, thanks a lot for this suggestion and for opening the PR. This is a design change and would affect all existing customers. We are working out the standards and practices to follow before allowing endpoints to be configured via endpoints URL. Please give us some time before we implement the feature. Thanks a lot for your patience. |
@imshashank Sounds good to me. I think these environment variables could be useful with any of the SDKs, so if a standard can be established, that always sounds like the better direction. |
+1. We are using Atlassian LocalStack running in docker to test our app running in docker, and we can set i.e. access key and default region to same as in localstack through app container env vars, but we cannot change endpoint to point to localstack url in same manner. Seems weird. |
+1 |
Any movement on this? It's been a while since we last heard about this. |
I know this use-case isn't going to fly but... It would be much better to be able to NOT having to specify an alias or wrapper for aws and "just work". If I know the awscli is installed somewhere in the container the following would work and it would allow us to spawn a regular S3 enabled container and configure the S3 access through environment variables, only. .env
docker-compose.yml
|
Has this been implemented yet? |
I implemented it here https://github.com/morecontainers/awscli as a patch on vanilla awscli. It should probably be implemented properly in boto but I have not found a problem yet with my work around. |
Whatever happened here? The PR was closed and then left to die. @kstich any ideas? I'm also using localstack and having to wrap all the client calls with custom code to only pass in an endpoint url via a custom defined env var. It's weird this isn't a default. |
Thank you for posting your feedback here, and our apologies that we’ve been thinking this over for a long time without much forward motion. There are similar requests to implement this feature in a few of the AWS SDKs and the AWS CLI, so in order to coordinate those teams - and hopefully make the discussions a little easier to follow - we’ve created a new issue in aws/aws-sdk here: aws/aws-sdk#229 |
Hi all, We recently added a pull request (aws/aws-sdk#230) that contains a proposal based on community comments and suggestions and our own discussions. This document proposes to extend the options for configuring the endpoint to allow users to provide an endpoint URL independently for each AWS service via an environment variable or a profile subsection in the shared configuration file. You can read the proposal here. For more information on how to give feedback, please see this comment on the aws/aws-sdk repository: Thanks! |
Hi all, As mentioned, aws/aws-sdk#230 contains a proposal for this feature based on community comments and suggestions. Work on this is still ongoing, but I think we've reached a place where this feature request is no longer needed on the PHP SDK's repository— The AWS SDKs and Tools team as a whole has assumed responsibility for this feature. I think we'll be seeing some updates on this very soon. |
I've been looking the documentation about environment variables and see that you are able to configure credentials, regions, and profiles using environment variables, but I do not see a way to configure the endpoint url option to point to our internal proxy.
My suggestion is to configure the endpoint url if either the
AWS_<REGION>_<SERVICE>_ENDPOINT
orAWS_<SERVICE>_ENDPOINT
(in that order of priority) environment variables are available.I suggest making this change in one of these locations (that I have found so far) in order of suggestion preference:
Aws\ClientResolver::_default_endpoint_provider
Aws\Endpoint\PartitionEndpointProvider::getPartition
For reference purposes:
Aws\Credentials\CredentialsProvider
use of environment variablesgetenv
DocumentationThe text was updated successfully, but these errors were encountered: