Created
November 21, 2025 04:55
-
-
Save fizz/c5a5a8ef44f7b2d2c96b2a8e9ead3d6a to your computer and use it in GitHub Desktop.
Update trust for KinesisAccessfordevElastic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Principal": { | |
| "AWS": "arn:aws:iam::150992150901:root" | |
| }, | |
| "Action": "sts:AssumeRole", | |
| "Condition": { | |
| "ArnLike": { | |
| "aws:PrincipalArn": [ | |
| "arn:aws:iam::150992150901:role/elastic-serverless-forwar-*", | |
| "arn:aws:iam::150992150901:role/pge-elasticsearch-role" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Replace with the actual ESF Lambda role ARN before running | |
| LAMBDA_ROLE_ARN="arn:aws:iam::150992150901:role/elastic-serverless-forwar-ApplicationElasticServer-REPLACE_ME" | |
| cat > trust-policy.json <<JSON | |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Principal": { | |
| "AWS": "arn:aws:iam::150992150901:root" | |
| }, | |
| "Action": "sts:AssumeRole", | |
| "Condition": { | |
| "ArnLike": { | |
| "aws:PrincipalArn": [ | |
| "arn:aws:iam::150992150901:role/elastic-serverless-forwar-*", | |
| "arn:aws:iam::150992150901:role/pge-elasticsearch-role" | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| JSON | |
| echo "Update trust policy in logging account (801458782278):" | |
| echo "aws iam update-assume-role-policy --role-name KinesisAccessfordevElastic --policy-document file://trust-policy.json" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment