Skip to content

provide better examples for setting up IAM roles - #317

Merged
rasika-chivate merged 43 commits into
2.15.0from
radoslaw-szulgo-improve-aws-automation-with-iam-roles-examples
Aug 20, 2026
Merged

provide better examples for setting up IAM roles#317
rasika-chivate merged 43 commits into
2.15.0from
radoslaw-szulgo-improve-aws-automation-with-iam-roles-examples

Conversation

@radoslawszulgo

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR significantly enhances the documentation for setting up IAM roles for Percona Backup for MongoDB in AWS environments. It expands the content from basic instructions to comprehensive, step-by-step guides with concrete examples.

Key Changes:

  • Restructured EC2 instance IAM section to focus on role assumption with detailed policy examples
  • Expanded IRSA (IAM Roles for Service Accounts) section with complete setup instructions including OIDC provider configuration, policy creation, and service account annotation
  • Added extensive JSON policy examples for trust relationships and S3 permissions
  • Included practical bash commands for AWS CLI operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/manage/automate-s3-access.md Outdated
Comment thread docs/manage/automate-s3-access.md Outdated
Comment thread docs/manage/automate-s3-access.md Outdated
]
}
```
> Remember to replace `EC2_ACCOUNT_ID` and `pbm-target-role` with the account ID and role name of your EC2 instance.

Copilot AI Nov 13, 2025

Copy link

Choose a reason for hiding this comment

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

The guidance text at line 47 is misleading. It states to "replace EC2_ACCOUNT_ID and pbm-target-role", but pbm-target-role in line 40 should actually be replaced with the EC2 instance role name, not the target role name. The note should clarify that users need to replace these placeholders with their EC2 instance's role information, not the target role being created.

Suggested change
> Remember to replace `EC2_ACCOUNT_ID` and `pbm-target-role` with the account ID and role name of your EC2 instance.
> Remember to replace `EC2_ACCOUNT_ID` and `pbm-target-role` with the account ID and role name of your EC2 instance's IAM role (the role attached to your EC2 instance that will assume the target role). Do **not** use the target role's name here.

Copilot uses AI. Check for mistakes.
Comment thread docs/manage/automate-s3-access.md Outdated

* **Trust Policy**: The trust policy of the target role must allow the EC2 instance's role to assume it.

For example, if your EC2 instance role is `arn:aws:iam::EC2_ACCOUNT_ID:role/pbm-target-role`, use the following trust policy for your target role:

Copilot AI Nov 13, 2025

Copy link

Choose a reason for hiding this comment

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

The introductory text for the trust policy is confusing. Line 31 states "if your EC2 instance role is arn:aws:iam::EC2_ACCOUNT_ID:role/pbm-target-role", but this should refer to the EC2 instance role (e.g., pbm-ec2-instance-role), not pbm-target-role. Using the same role name for both the EC2 instance role and the target role creates confusion about which role is which.

Copilot uses AI. Check for mistakes.
Comment thread docs/manage/automate-s3-access.md Outdated

Copilot AI commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

@radoslawszulgo I've opened a new pull request, #318, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 4 commits November 13, 2025 12:20
Co-authored-by: radoslawszulgo <175048287+radoslawszulgo@users.noreply.github.com>
Co-authored-by: radoslawszulgo <175048287+radoslawszulgo@users.noreply.github.com>
Co-authored-by: radoslawszulgo <175048287+radoslawszulgo@users.noreply.github.com>
Add OIDC ID extraction guidance for IRSA setup
@it-percona
it-percona temporarily deployed to radoslaw-szulgo-improve-aws-automation-with-iam-roles-examples - pbm-docs PR #317 November 13, 2025 12:29 — with Render Destroyed
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

@radoslawszulgo I've opened a new pull request, #319, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits November 13, 2025 12:34
…rget role

Co-authored-by: radoslawszulgo <175048287+radoslawszulgo@users.noreply.github.com>
Fix IAM trust policy example to reference EC2 instance role

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/manage/automate-s3-access.md Outdated
Comment thread docs/manage/automate-s3-access.md Outdated
Comment thread docs/manage/automate-s3-access.md Outdated
Comment thread docs/manage/automate-s3-access.md Outdated
Comment thread docs/manage/automate-s3-access.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@it-percona
it-percona temporarily deployed to radoslaw-szulgo-improve-aws-automation-with-iam-roles-examples - pbm-docs PR #317 June 23, 2026 09:29 — with Render Destroyed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Comment thread docs/usage/restore-physical.md Outdated

If Encryption at Rest is enabled, the restore requires access to the same encryption key that was active when the backup was taken.
- For manually managed key files, update mongod.conf on all nodes to point to the original key before starting the restore procedure.
- For Hashicorp Vault-managed keys, ensure the historical key version is still available inside Vault. No changes to mongod.conf are required.
Comment thread docs/manage/automate-s3-access.md
Comment thread docs/manage/automate-s3-access.md
@igroene

igroene commented Jul 20, 2026

Copy link
Copy Markdown
Member

@radoslawszulgo should we merge this? anything pending ?

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: rasika-chivate <95711051+rasika-chivate@users.noreply.github.com>
Copilot AI requested a review from rasika-chivate August 20, 2026 09:36
@rasika-chivate
rasika-chivate merged commit efe192d into 2.15.0 Aug 20, 2026
3 of 4 checks passed
Copilot stopped work on behalf of rasika-chivate due to an error August 20, 2026 09:36
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.

8 participants