Update CodeBuild Role
Update CodeBuild Role
- Access the IAM service:
- On the left menu, choose Roles.
- Search for
codebuild
. - Select the codebuild role corresponding to your project.

- Choose Add permissions, then Create inline policy.

- Copy and paste the policy below into the Policy editor. Then scroll down and choose Next.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecr-public:GetAuthorizationToken",
"sts:GetServiceBearerToken",
"ecr-public:BatchCheckLayerAvailability",
"ecr-public:GetRepositoryPolicy",
"ecr-public:DescribeRepositories",
"ecr-public:DescribeRegistries",
"ecr-public:DescribeImages",
"ecr-public:DescribeImageTags",
"ecr-public:GetRepositoryCatalogData",
"ecr-public:GetRegistryCatalogData"
],
"Resource": "*"
}
]
}

- In the Policy name field, enter FCJ_ECR_Public_Access. Then press Create policy.

- Confirm that the policy has been added successfully.

- Continue to choose Add permissions, then Attach policies.

- Search for AmazonEC2ContainerRegistryFullAccess. Select and press Add permissions.

- Confirm that the policy has been added successfully.
