Unable to pass CI/CD Automation Using AWS Code Pipeline

Hello everyone.
I’m unable to pass Kodekloud engineer lab on AWS, level4 - “CI/CD Automation Using AWS Code Pipeline” due to such validation error - “The website did not reflect the changes made to the index.html file.”

In my CodePipeline I have 2 steps - Source And Build both of them are in green state.
If I change text in index.html and push it to CodeCommit repo changed text is updated when I’m accessing index.html page on s3 bucket.

Could you please clarify how can I pass this lab?

IAM policy -

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Resource": [
                "arn:aws:logs:us-east-1:533267179439:log-group:/aws/codebuild/nautilus-build-project",
                "arn:aws:logs:us-east-1:533267179439:log-group:/aws/codebuild/nautilus-build-project:*"
            ],
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ]
        },
        {
            "Effect": "Allow",
            "Resource": [
                "arn:aws:s3:::codepipeline-us-east-1-*"
            ],
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:GetObjectVersion",
                "s3:GetBucketAcl",
                "s3:GetBucketLocation"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "codebuild:CreateReportGroup",
                "codebuild:CreateReport",
                "codebuild:UpdateReport",
                "codebuild:BatchPutTestCases",
                "codebuild:BatchPutCodeCoverages"
            ],
            "Resource": [
                "arn:aws:codebuild:us-east-1:533267179439:report-group/nautilus-build-project-*"
            ]
        }
    ]
}

Hi petya.bogdan,

I’ve just checked it and it’s worked properly from my end.

Can you share more details about your build code and S3 bucket policy?


Hello Raymond.
By bucket policy is following -

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::nautilus-deployment-16890/*"
        }
    ]
}

Code after latest task verification - Welcome to the KKE AWS Labs! Updated

Added for Testing:-1836

When I tested it, it was only such text - Welcome to the KKE AWS Labs! Updated

When I go to website url - http://nautilus-deployment-16890.s3-website-us-east-1.amazonaws.com/ I see the following message -

Welcome to the KKE AWS Labs! Updated Added for Testing:-1836

Hi,

What error do you see when you submit the engineer lab?

Hi Raymond.
The error is "“The website did not reflect the changes made to the index.html file.”

Finally I’ve passed it.
The only change I’ve made is in CodePipeline set tracking changes with AWS Cloudwatch (recommended solution) before that I’ve tested it with CodeCommit.