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?
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.
- 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
- 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.
- 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