-
Notifications
You must be signed in to change notification settings - Fork 115
full_name': KeyError” in GitPullLambda when processing BitBucket WebHook request #27
Comments
any update would be of great help |
Any update? |
I Have no idea and how to fix the lambda code to support bitbucket server with aws code pipeline. Any suggestion or help with being much appreciated. |
I have this same issue @sathyajackson. The test payload will fail - but if you actually push to your repo, that payload will succeed. |
@sathyajackson If you still need to modify the lambda.zip, you can pull it down from github (https://github.com/aws-quickstart/quickstart-git2s3/blob/master/functions/packages/GitPullS3/lambda.zip), modify it, and push it back up to the generated zips s3 bucket and manually attach it to your lambda function (upload the modified lambda.zip) |
Hi Mia, I also noticed that in the lambda_fucntion under line 158 I dont have the following |
Hi All,
I am facing the same problem as #14. We have an in-house bitbucket and trying to integrate the webhook with AWS service. While troubleshooting with AWS we found that the payload from the bitbucket is completely different from the one which the lambda function expects.
Lambda error : -
'project': KeyError
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 158, in lambda_handler
full_name = event['body-json']['project']['path_with_namespace']
KeyError: 'project'
Bitbucket body sent : -
{
"eventKey":"repo:refs_changed",
"date":"2018-10-30T12:06:21+0000",
"actor":{
"name":"sathyanarayanan.ramamurthy",
"emailAddress":"Sathyanarayanan.Ramamurthy@csscorp.com",
"id":269,
"displayName":"Sathyanarayanan Ramamurthy",
"active":true,
"slug":"sathyanarayanan.ramamurthy",
"type":"NORMAL"
},
"repository":{
"slug":"demo-aws-codedeploy",
"id":361,
"name":"demo-aws-codedeploy",
"scmId":"git",
"state":"AVAILABLE",
"statusMessage":"Available",
"forkable":true,
"project":{
"key":"IT",
"id":154,
"name":"Internal Testing",
"public":false,
"type":"NORMAL"
},
"public":false
},
"changes":[
{
"ref":{
"id":"refs/heads/master",
"displayId":"master",
"type":"BRANCH"
},
"refId":"refs/heads/master",
"fromHash":"ebb01dc966228ea93cc6036d9efe94f56480b89d",
"toHash":"3f8371baa548e516eee3d68b09fb4f608ff42920",
"type":"UPDATE"
}
]
}
The text was updated successfully, but these errors were encountered: