Atlas iamRoleId

Hi guys, I’m setting up a backup export to an S3 bucket and I can’t find a valid value for the iamRoleId. Does anyone know how to get this value given that there is already an iam role configured?

Just as a reference:

atlas backup exports buckets create

Create bucket reference

Hi @Leandro_Domingues,

I haven’t tried backup export creation from the atlas cli yet but it may be from atlas cloudProviders accessRoles list. Output testing it out (after running atlas cloudProviders accessRoles aws create):

atlas cloudProviders accessRoles list          
{
  "awsIamRoles": [
    {
      "atlasAWSAccountArn": "<REDACTED>",
      "atlasAssumedRoleExternalId": "<REDACTED>",
      "createdDate": "2023-07-21T00:40:13Z",
      "roleId": "<REDACTED>", // <--- This value
      "providerName": "AWS"
    }
  ]
}

Let me know if this is roleId value works and I will enquire about this further with the team.

Regards,
Jason

1 Like

Thank you Jason!

I achieved it using a similar process but through the Atlas API:
https://docs.atlas.mongodb.com/reference/api/cloud-provider-access-get-roles/#get-all-cloud-provider-access-roles

1 Like

Nice one - Thanks for posting the solution too Leandro!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.