Skip to content

Instantly share code, notes, and snippets.

@guilhermef
Created May 21, 2020 10:47
Show Gist options
  • Save guilhermef/9878ed13cad6cff617f548cde7f1b177 to your computer and use it in GitHub Desktop.
Save guilhermef/9878ed13cad6cff617f548cde7f1b177 to your computer and use it in GitHub Desktop.
Role policy to assume itself
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecr:GetAuthorizationToken",
"ecr:BatchCheckLayerAvailability",
"ecr:GetDownloadUrlForLayer",
"ecr:GetRepositoryPolicy",
"ecr:DescribeRepositories",
"ecr:ListImages",
"ecr:DescribeImages",
"ecr:BatchGetImage",
"ecr:DescribeImageScanFindings"
],
"Resource": [
"*"
]
},
{
"Effect": "Allow",
"Action": [
"sts:AssumeRole"
],
"Resource": [
"arn:aws:iam::<account-id>:role/my-jenkins-worker-instance-role"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment