Skip to content

Conversation

@AndrewChubatiuk
Copy link

Thank you for this driver
In this PR:

  • added flyway support
  • extended dynamodb syntax support (WITH NO SCHEMA BINDING, SORTKEY, DISTKEY)
  • upgraded all dependencies

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "jp.ne.opt.redshiftfake.postgres.Driver" to "jp.ne.opt.redshiftfake.postgresql.Driver"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

updated class name
AwsBasicCredentials.create(accessKeyId, secretAccessKey)
)
)
case Credentials.WithRole(roleName) =>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't been able to get this to run. I keep getting:

software.amazon.awssdk.services.sts.model.StsException: The security token included in the request is invalid. (Service: Sts, Status Code: 403, Request ID: fb539513-99dc-4506-a908-bffb45e766f1)

anytime I supply iam_role '<role_arn>'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you share an example of query you're using?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This query works perfectly(using aws_keys):

    UNLOAD ('select * from pg_catalog.pg_tables')
    TO 'http://127.0.0.1:9444/test_bucket_1/tt/test.csv'
    credentials 'aws_access_key_id=AKIAXXXX;aws_secret_access_key=YYYYYY'

But this doesn't work(iam_role):

    UNLOAD ('select * from pg_catalog.pg_tables')
    TO 'http://127.0.0.1:9444/test_bucket_1/tt/test.csv'
    iam_role 'arn:aws:iam::123456789012:role/some-role'

The error I get is: software.amazon.awssdk.services.sts.model.StsException: The security token included in the request is invalid. (Service: Sts, Status Code: 403, Request ID: 53594081-d02c-40e4-a42b-ca8a8e6c0f1a).

For context, I'm using this driver through python (using jaydebeapi and jpype). But the error seems to come from the scala code.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you running this in pod, on EC2 instance or do you provide credentials either with env variables or ~/.aws/credentials?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment, I'm running this locally. I'll be running this within aws codebuild, which is essentially a docker container.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to assume role you still need to run it with IAM user creds (from env variables or config) or with IAM role (running inside pod or EC2 instance)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that. In my ~/.aws/credentials file, I have

[default]
aws_access_key_id = foobar_key
aws_secret_access_key = secret

Tried it with an actual set of keys too.

@AndrewChubatiuk
Copy link
Author

@ocadaruma are you still maintaining this repo?

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

Successfully merging this pull request may close these issues.

2 participants