Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

I have created a code build project from code pipeline wizard with all the necessary required options and valid IAM role. I have added IAM role policy as well which is required for accessing and writing the data inside the S3 bucket. below mentioned policy I have already considered for accessing S3.

{

"Version": "2012-10-17",

"Statement": [

    {

        "Effect": "Allow",

        "Resource": [

            "arn:aws:logs:aws/codebuild",

            "arn:aws:logs:aws/codebuild:*"

        ],

        "Action": [

            "logs:CreateLogGroup",

            "logs:CreateLogStream",

            "logs:PutLogEvents"

        ]

    },

    {

        "Effect": "Allow",

        "Resource": [

            "arn:aws:s3:::pipeline”,

            "arn:aws:s3::: pipeline/*"

        ],

        "Action": [

            "s3:PutObject",

            "s3:GetObject",

            "s3:GetObjectVersion",

            "s3:GetBucketAcl",

            "s3:GetBucketLocation"

        ]

    }

]

}

Once I initiated a pipeline, code build is getting failed and I am getting below mentioned error

DOWNLOAD_SOURCE Failed: 

CLIENT_ERROR: symlink /codebuild/output/.../libcrypto.1.0.0.dylib: no such file or directory for primary source and source version arn:aws:s3:::codepipeline-bucketSource/Ap4g3sv.zip

I have researched a lot, have been through the various AWS documents but could not find the solution.

1 Answer

0 votes
by (44.4k points)

Finally, after a lot of research, I found out that it was a permission issue only. I had to change the policy as mentioned below:

{

    "Version": "2012-10-17",

    "Statement": [

        {

            "Action": [

                "logs:CreateLogGroup",

                "logs:CreateLogStream",

                "logs:PutLogEvents"

            ],

            "Resource": [

                "*"

            ],

            "Effect": "Allow"

        },

        {

            "Action": [

                "s3:PutObject",

                "s3:GetObject",

                "s3:GetObjectVersion",

                "s3:GetBucketAcl",

                "s3:GetBucketLocation"

            ],

            "Resource": [

                "*"

            ],

            "Effect": "Allow"

        }

    ]

}

After adding this modification my code build and pipeline started working.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...