Pradhmanyu
Pradhmanyu

Reputation: 31

GitHub Aws Code deployment shows "AWS CodeDeploy doesn't support the push event"

Oops, we weren’t able to send the test payload: AWS Code Deploy doesn't support the push event.

Above error shown to me when I am trying to test my hook service "Code Deploy For AWS". Also when I commit my code it should automatically deploy my new code, but it fails. Can you help me out for above?

Upvotes: 3

Views: 687

Answers (3)

Alex Glover
Alex Glover

Reputation: 876

Several people have had this same issue, and there are a few things to double check and a few tricky parts in that AWS Blog post that aren't well explained.

  1. Double check your IAM User that you created, and make sure it has the correct IAM policy. You can use the AWS-provided "AWSCodeDeployDeployerAccess" policy if you don't want to write your own
  2. Check out this post in the AWS Developer Forum. The TLDR is that the deployment group must be all lower case. For some reason GitHub down-cases the deployment group name in the API call, which will cause a name mismatch with your deployment group in AWS.
  3. Make sure that you set your "environments" property to the name of your deployment group when you set up your "GitHub Auto-Deployment" service. The blog post doesn't say that they need to match, but if you look at the screenshots, the author does in fact use the same string for both the "environments" property in the Auto-Deployment service and the Deployment Group property in the AWS CodeDeploy service

If you're still having a hard time setting up the GitHub hook or CodeDeploy in general, I encourage you to take my AWS CodeDeploy course

Upvotes: 4

Tapaswi Panda
Tapaswi Panda

Reputation: 1051

I was getting the same issue while testing the service hooks, then I checked my deployment group name in AWS was different then the 'environments' value in Github, I changed to have the same value in both places. now it works.

And make sure the the IAM user you are using is having codeDeployAccess permission. In my case it is this or you can use the AWS existing policy for this, i.e 'AWSCodeDeployDeployerAccess'.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "codedeploy:*",
      "Resource": "*"
    }
  ]
}

Though it still show this error when I test the web hook service in Github but it really works when I push my code, some people mentioned the same as well in this post. So even though your web hook test shows error, you can ahead and test with a real git push.

Upvotes: 0

Surya Bala
Surya Bala

Reputation: 261

If possible can you paste the permission policy for the AWS user that you use to call CodeDeploy from Github? Most commonly a problem with your permission settings on the user would raise this error.

Also are you setting the aws_region configuration to the region where your CodeDeploy application exists? Otherwise github uses 'us-east-1' by default. Please see https://github.com/github/github-services/pull/1014

Thanks,
Surya.

Upvotes: 0

Related Questions