Git Product home page Git Product logo

Comments (5)

simonw avatar simonw commented on July 19, 2024

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.create_role confirms that the default value is 1 hour.

from s3-credentials.

simonw avatar simonw commented on July 19, 2024

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.update_role can be used to update the role to fix this.

from s3-credentials.

simonw avatar simonw commented on July 19, 2024
~ % s3-credentials list-roles s3-credentials.AmazonS3FullAccess
[
  {
    "Path": "/",
    "RoleName": "s3-credentials.AmazonS3FullAccess",
    "RoleId": "AROAWXFXAIOZKX4I47KJM",
    "Arn": "arn:aws:iam::462092780466:role/s3-credentials.AmazonS3FullAccess",
    "CreateDate": "2021-11-10 01:53:24+00:00",
    "AssumeRolePolicyDocument": {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Principal": {
            "AWS": "arn:aws:iam::462092780466:root"
          },
          "Action": "sts:AssumeRole",
          "Condition": {}
        }
      ]
    },
    "Description": "Role used by the s3-credentials tool to create time-limited credentials that are restricted to specific buckets",
    "MaxSessionDuration": 3600
  }
]

from s3-credentials.

simonw avatar simonw commented on July 19, 2024

Manually tested the fix by deleting my s3-credentials.AmazonS3FullAccess role and then running this command:

 % s3-credentials create datasette-cloud-backups -d 1h                    
Assume role against arn:aws:iam::462092780466:role/s3-credentials.AmazonS3FullAccess for 3600s
{
    "AccessKeyId": "ASIAWXFXAIOZG4XZQ54R",
    "SecretAccessKey": "...",
    "SessionToken": "F...",
    "Expiration": "2022-08-01 20:38:24+00:00"
}

image

So that worked as expected - the role has 12 hours now.

from s3-credentials.

simonw avatar simonw commented on July 19, 2024

If you are affected by this bug you can fix the role manually by going here:

https://console.aws.amazon.com/iamv2/home#/roles/details/s3-credentials.AmazonS3FullAccess?section=permissions

And clicking the "Edit" button.

image

from s3-credentials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.