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

added new sts role configuration parameter to assume aws role dynamic… #944

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KiraPC
Copy link

@KiraPC KiraPC commented May 30, 2021

This PR is intended to add a new feature in order to allow dynamic assume role by just configuring the role-arn in the META class.

class Tip(Model):
    class Meta:
        aws_sts_role_arn='arn:aws:iam::1234567:role/my-aws-role'  
        table_name = "my_table"
        region = 'eu-central-1'

    id = UnicodeAttribute(hash_key=True)

This is a draft, to get your POV about this feature: if it is acceptable, if my code can be improved, or so on.

I will add tests and update the doc in next days.

@KiraPC KiraPC marked this pull request as ready for review May 31, 2021 08:32
@garrettheel
Copy link
Member

Hey @KiraPC, I think this is straying a little too far into re-implementing botocore concepts. Is there a reason that https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html wouldn't work for you?

@KiraPC
Copy link
Author

KiraPC commented Jun 13, 2021

Hi @garrettheel thank you.

To be honest, I didn't tested this approach. I'll try in next days.

Anyway, if you think that implementation is far to standard, close it.

@andrewlytle
Copy link

Hey @KiraPC, I think this is straying a little too far into re-implementing botocore concepts. Is there a reason that https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html wouldn't work for you?

How is this re-implementing botocore concepts? This would allow you to assume a role, and then tell Pynamo to use that role. It's not always possible to use that role from the command line.

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.

3 participants