Home > Enterprise >  Pipleline wont build and shows access_denied error even after changing policies
Pipleline wont build and shows access_denied error even after changing policies

Time:12-23

ACCESS_DENIED: Service role arn:aws:iam::749760571158:role/codebuild-hu-cb-crm-poc-service-role does not allow AWS CodeBuild to create Amazon CloudWatch Logs log streams for build arn:aws:codebuild:ap-south-1:749760571158:build/hu-moxie-crm-cb:7af26655-bea9-41b8-94c9-38b1c7a68d1e. Error message: User: arn:aws:sts::749760571158:assumed-role/codebuild-hu-cb-crm-poc-service-role/AWSCodeBuild-7af26655-bea9-41b8-94c9-38b1c7a68d1e is not authorized to perform: logs:CreateLogStream on resource: arn:aws:logs:ap-south-1:749760571158:log-group:/aws/codebuild/hu-moxie-crm-cb:log-stream:7af26655-bea9-41b8-94c9-38b1c7a68d1e because no identity-based policy allows the logs:CreateLogStream action

I have set up my pipeline and everything is running, even the website is opening but I am still getting this build error

I gave all the required policy but it still isnt working

CodePudding user response:

The error message tells you what to do.

You need to allow logs:CreateLogStream action on the codebuild-hu-cb-crm-poc-service-role role.

Attach this policy to the role.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:PutLogEvents",
        "logs:DescribeLogStreams"
    ],
      "Resource": [
        "*"
    ]
  }
 ]
}
  • Related