Skip to content

Let the AI SRE role read the account's name - #24

Merged
matejlauko merged 1 commit into
mainfrom
ai-sre-account-name
Nov 23, 2026
Merged

matejlauko merged 1 commit into
mainfrom
ai-sre-account-name

Conversation

@matejlauko

@matejlauko matejlauko commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What changes for a customer's role

  • The role gets one more read in its default setting (AllowConfigurationValues=false): account:GetAccountInformation, in the InvestigationReads statement next to iam:ListAccountAliases and account:ListRegions.
  • It returns the account's name, ID and creation date. Better Stack uses the name to label the integration. Most accounts have no sign-in alias, so today the label is only the 12-digit account ID.
  • A stack gets the read when it is updated to this release. Until then, Better Stack falls back to the account ID, as today.

What doesn't change

  • AllowConfigurationValues=true: AWS's ReadOnlyAccess already grants account:GetAccountInformation (it is in the reviewed v192 copy, test/fixtures/read-only-access-policy.json).
  • The denies: no deny policy names an account: action, so nothing denies the new read.
  • iam:ListAccountAliases stays in the role.
  • The template contract: parameters, role name, trust, version tag and deny policy names are unchanged.

How to verify

cd cloudformation/ai-sre/test
pip install cfn-lint==1.60.0 pyyaml==6.0.3
cfn-lint ../better-stack-ai-sre.yaml
python check_contract.py
python -m unittest -v   # includes account:GetAccountInformation allowed in both settings
  • test/simulate_policy.py expects account:GetAccountInformation allowed in both settings; without the template change the default setting fails with implicitDeny.
  • Run the E2E AI SRE workflow on this branch: the stack deploys and the simulator allows the read on the deployed role in both settings.
  • Release as a patch (v1.3.2) after merge: one read added, no new parameter, no contract change.

🤖 Generated with Claude Code

Add account:GetAccountInformation to the restricted role's InvestigationReads
statement, next to iam:ListAccountAliases and account:ListRegions, so Better
Stack can name an integration after its AWS account. Most accounts have no
sign-in alias, so the alias alone leaves only the account ID.

AllowConfigurationValues=true needs no change: AWS's ReadOnlyAccess already
grants the action, and no deny policy names an account: action.
@matejlauko
matejlauko merged commit 175d5da into main Nov 23, 2026
12 checks passed
@matejlauko
matejlauko deleted the ai-sre-account-name branch November 23, 2026 09:22
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.

1 participant