{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-php/issues/580","labels_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/580/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/580/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/580/events","html_url":"https://github.com/aws/aws-sdk-php/issues/580","id":77672601,"number":580,"title":"AWS Lambda updateFunctionCode() method does not work in PHP","user":{"login":"pako-pl","id":8288517,"avatar_url":"https://avatars.githubusercontent.com/u/8288517?v=3","gravatar_id":"","url":"https://api.github.com/users/pako-pl","html_url":"https://github.com/pako-pl","followers_url":"https://api.github.com/users/pako-pl/followers","following_url":"https://api.github.com/users/pako-pl/following{/other_user}","gists_url":"https://api.github.com/users/pako-pl/gists{/gist_id}","starred_url":"https://api.github.com/users/pako-pl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pako-pl/subscriptions","organizations_url":"https://api.github.com/users/pako-pl/orgs","repos_url":"https://api.github.com/users/pako-pl/repos","events_url":"https://api.github.com/users/pako-pl/events{/privacy}","received_events_url":"https://api.github.com/users/pako-pl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-18T14:15:58Z","updated_at":"2015-05-18T20:02:04Z","closed_at":null,"body":"````\r\n$lambdaClient->updateFunctionCode(array(\r\n      'FunctionName' => 'TestFunction',\r\n      'ZipFile' => base64_encode(file_get_contents('test.zip')),\r\n));\r\n````\r\n\r\nThe 'ZipFile' value seems to be skipped and the request has no contents:\r\n\r\n````\r\n# Request:\r\nPUT /2015-03-31/functions/TestFunction/versions/HEAD/code HTTP/1.1\r\nHost: lambda.eu-west-1.amazonaws.com\r\nUser-Agent: aws-sdk-php2/2.8.4 Guzzle/3.9.3 curl/7.26.0 PHP/5.6.9\r\nx-amz-date: 20150518T140640Z\r\nAuthorization: AWS4-HMAC-SHA256 Credential=XXXXXXXXXXXXXXXXXX/eu-west-1/lambda/aws4_request, SignedHeaders=host;x-amz-date, Signature=XXXXXXXXXXXXXXXXXXXXXXXXXX\r\nContent-Length: 0\r\n\r\n\r\n# Response:\r\nHTTP/1.1 400 Bad Request\r\nContent-Type: application/json\r\nDate: Mon, 18 May 2015 14:06:41 GMT\r\nx-amzn-ErrorType: InvalidParameterValueException:http://internal.amazon.com/coral/com.amazonaws.awsgirapi/\r\nx-amzn-RequestId: 1b7c3081-fd67-11e4-a30d-476b25cb4f44\r\nContent-Length: 70\r\nConnection: keep-alive\r\n\r\n{\"Type\":\"User\",\"message\":\"Please provide a source for function code.\"}\r\n````\r\n\r\nUploading the same file through the AWS Console works fine."},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-php/issues/comments/103193723","html_url":"https://github.com/aws/aws-sdk-php/issues/580#issuecomment-103193723","issue_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/580","id":103193723,"user":{"login":"mtdowling","id":190930,"avatar_url":"https://avatars.githubusercontent.com/u/190930?v=3","gravatar_id":"","url":"https://api.github.com/users/mtdowling","html_url":"https://github.com/mtdowling","followers_url":"https://api.github.com/users/mtdowling/followers","following_url":"https://api.github.com/users/mtdowling/following{/other_user}","gists_url":"https://api.github.com/users/mtdowling/gists{/gist_id}","starred_url":"https://api.github.com/users/mtdowling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtdowling/subscriptions","organizations_url":"https://api.github.com/users/mtdowling/orgs","repos_url":"https://api.github.com/users/mtdowling/repos","events_url":"https://api.github.com/users/mtdowling/events{/privacy}","received_events_url":"https://api.github.com/users/mtdowling/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T20:02:04Z","updated_at":"2015-05-18T20:02:04Z","body":"Looks like this is an issue similar to one we've had before with Lambda in that the \"ZipFile\" needs a location of \"body\". We'll take a look at our service description generator to see why this is happening to fix this at the source."}}