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

Adding support for Cross Account Access to Glue Catalog #180

Open
steveipkis opened this issue Oct 1, 2021 · 0 comments
Open

Adding support for Cross Account Access to Glue Catalog #180

steveipkis opened this issue Oct 1, 2021 · 0 comments

Comments

@steveipkis
Copy link

Issue:

When trying to connect to AWS Glue, the configuration states that

Glue requires no further configuration. We will let boto3 handle the connection configuration.
Added source: <name> to ~/.whale/config/connections.yaml.

This is an issue, since the organization I work at uses cross accounts, thus, requiring me to swap out profiles when trying to access resources. Currently, I am unable to specify which profile to use in order to extract data and it ends up using the default aws credentials, which does not have access to the aws glue catalog.

Possible Solution:

This could be remedied by asking the user to specify the aws config to use and then make modifications to the class constructor of GlueExtractor.py.

Something along the lines of:

DEFAULT_CONFIG = ConfigFactory.from_dict(
    {
        FILTER_KEY: None,
        IS_LOCATION_PARSING_ENABLED_KEY: False,
        CONNECTION_NAME_KEY: None,
        AWS_PROFILE: "default"
    }
)

def init(self, conf: ConfigTree) -> None:
    # Lines skipped for readability....
    conf = conf.with_fallback(GlueExtractor.DEFAULT_CONFIG)
    self._aws_profile = conf.get(GlueExtractor.AWS_PROFILE)
    session = boto3.Session(profile_name=self._aws_profile)
    self._glue = session.client("glue")

Let me know if you would like me to try and make a PR with the suggested changes or whether you have another idea on how to resolve this.

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

1 participant