AntonShuvaev / intellij-dynamodb

DynamoDB plugin for Intellij IDEA and other JetBrains IDEs
https://plugins.jetbrains.com/plugin/18896-dynamodb
16 stars 0 forks source link

Assumed role not respected #13

Closed tautologistics closed 2 years ago

tautologistics commented 2 years ago

Hello,

I have the plugin configured to connect with a profile set up to use an assumed role and am able to enumerate and query tables but they are the tables in the bastion account and not the sub-account that the profile is pointed to.

image

The enumerated list in the DynamoDB panel are the tables in the bastion account and not the assumed role account.

When I list the tables with the CLI (aws --profile=staging dynamodb list-tables), the correct set of tables are listed.

Pertinent contents of ~/.aws/config:

[default]
region=us-east-1

[profile main]
region=us-east-1

[profile staging]
role_arn=arn:aws:iam::############:role/OrganizationAccountAccessRole
source_profile=main
region = us-east-1

Pertinent contents of ~/.aws/credentials:

[main]
aws_access_key_id = XXXXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

[staging]
aws_access_key_id = XXXXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AntonShuvaev commented 2 years ago

Hi,

Thanks for reporting an issue. The problem is that currently only one file (config or credentials) can be specified. I will fix it.

AntonShuvaev commented 2 years ago

I've added ability to specify /.aws/config file along with /.aws/credentials file in 2022.2.1

tautologistics commented 2 years ago

That worked; thank you!