Skip to content
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

Override athena endpoint #47

Open
keshav-dataco opened this issue Sep 27, 2022 · 2 comments
Open

Override athena endpoint #47

keshav-dataco opened this issue Sep 27, 2022 · 2 comments
Assignees

Comments

@keshav-dataco
Copy link
Contributor

Is there a way to override the athena endpoint like s3 or dynamo can be overridden?

@keshav-dataco keshav-dataco changed the title Override endpoint Override athena endpoint Sep 27, 2022
@henrywoo
Copy link
Collaborator

@keshav-1835i Can you please give an example of s3/dynamo endpoints getting overridden?

@henrywoo henrywoo self-assigned this Sep 28, 2022
@keshav-dataco
Copy link
Contributor Author

keshav-dataco commented Sep 30, 2022

Something like this when I want to connect to a local instance of dynamo.

customResolver := aws.EndpointResolverWithOptionsFunc(func(service, region string, options ...interface{}) (aws.Endpoint, error) {
		return aws.Endpoint{
			URL: endpoint,
		}, nil
	})

cfg, _ := config.LoadDefaultConfig(context.Background(),
config.WithRegion(region),
config.WithCredentialsProvider(
	credentials.NewStaticCredentialsProvider(accessKey, secret, ""),
), config.WithEndpointResolverWithOptions(customResolver))

value of endpoint is "http://localhost:8000"

I am trying to simulate local athena with hadoop and presto/trino running locally and hence the question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants