-
Notifications
You must be signed in to change notification settings - Fork 103
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
Localstack (custom endpoint-url) support #1050
Comments
Hey @srgg, thanks for opening this feature request! I'm not familiar with LocalStack, but it seems like the AWS Go SDK supports a custom endpoint, and LocalStack even has a document on how to configure it. We configure and create our session mainly in this function: steampipe-plugin-aws/aws/service.go Lines 1976 to 2027 in f837d5c
In terms of configuring the AWS plugin, what would you expect an AWS plugin config connection to look like? For instance, would a connection per LocalStack environment with a different |
@cbruno10 Thank you for the quick response. For my limited Integration testing use case it should be enough to have just one generic endpoint-url being provided on per connection basis. As far as I know there is no extra requirements from Localstack. But AWS provides different regional endpoints for the sake of compliance. AWS Go lang SDK (googled fro this) has ability to provide custom resolver, here is several useful links:
I have never used any of those, so I definetly not the right guy to decide how it can looks like. Therefore what I can suggest/request for the simple case I have:
|
@cbruno10 Thank you for pointing out exact place in the code, I've create a PR for the fix. One thing about that - I'm not sure how that change can be tested automatically, I've checked both options: AWS_ENDPOINT env variable and config with endpoit_url -- both seems to me working. |
Thank you for working on and opening a PR so quickly @srgg, great stuff! While looking around to see if AWS had an environment variable of their own today for the CLI or SDKs for setting an endpoint URL, I came across aws/aws-sdk#229, which contained a proposal from the AWS team on how to handle setting custom endpoints overall. Interestingly, they proposed adding config and environment variable support per service, with some alternative solutions for setting a global endpoint URL (among others). We like to be as close and consistent with AWS as we can be, though sometimes we do need to deviate from their design principles due to the way plugins are designed. We're closely monitoring how they're thinking of implementing endpoint URLs beyond what they have today (the While using LocalStack, or other local AWS environments, do you ever have different endpoints per service, e.g., DynamoDB vs. S3 vs. EC2? Does LocalStack make all of these services available on the same endpoint? Also, do you ever use other local environments, like DynamoDB Local together with LocalStack? A per service endpoint only design does not seem like it'd work well with LocalStack, assuming that all AWS services are available on the same endpoint in LocalStack. Look forward to your thoughts on this! |
@cbruno10 Thank you to pointing me out to the AWS ticket, I've made my suggestion to their proposal Considering how long that epoch (lacking any support for endpoint_url) lasts , I'm personally, do not expect that they will implement/release this as high priority. So the question: How do you guys want to move forward with that? My interest is to get this merged in order to unblock integration testing over Localstack, I definitely, can make an adjustment by changing Addressing your's questions:
|
Thanks @srgg for adding your suggestion, I like the idea of having a global endpoint URL with the ability to override per service. In regards to the AWS plugin, I think following a similar design would be helpful, so here are my proposed ideas on custom endpoints:
There are plans to move this plugin to use AWS Go SDK v2 as well, and I believe that SDK should support the above proposal as well per Configuring Client Endpoints. @srgg @johnsmyth - Any thoughts on the proposal above? Thanks! |
@cbruno10 Proposed changes make a lot of sense to me. Moreover, I have updated PR and it covers the following parts of the proposal you have made:
Can you please review the PR one more time, and, hopefully, accept it? |
Is your feature request related to a problem? Please describe.
Localstack requires to use custom endpoint url. Lack of aws endpoint configuration introduces a huge complexity for steampipe + localstack integration testing.
Describe the solution you'd like
It wil be great if custom endpoint url can be specified through plugin configuration mechanism.
The text was updated successfully, but these errors were encountered: