{"action":"created","issue":{"url":"https://api.github.com/repos/spulec/moto/issues/662","repository_url":"https://api.github.com/repos/spulec/moto","labels_url":"https://api.github.com/repos/spulec/moto/issues/662/labels{/name}","comments_url":"https://api.github.com/repos/spulec/moto/issues/662/comments","events_url":"https://api.github.com/repos/spulec/moto/issues/662/events","html_url":"https://github.com/spulec/moto/issues/662","id":164974197,"number":662,"title":"VersionId key missing from put() response in boto3","user":{"login":"dargueta-work","id":12239499,"avatar_url":"https://avatars.githubusercontent.com/u/12239499?v=3","gravatar_id":"","url":"https://api.github.com/users/dargueta-work","html_url":"https://github.com/dargueta-work","followers_url":"https://api.github.com/users/dargueta-work/followers","following_url":"https://api.github.com/users/dargueta-work/following{/other_user}","gists_url":"https://api.github.com/users/dargueta-work/gists{/gist_id}","starred_url":"https://api.github.com/users/dargueta-work/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dargueta-work/subscriptions","organizations_url":"https://api.github.com/users/dargueta-work/orgs","repos_url":"https://api.github.com/users/dargueta-work/repos","events_url":"https://api.github.com/users/dargueta-work/events{/privacy}","received_events_url":"https://api.github.com/users/dargueta-work/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-12T01:22:19Z","updated_at":"2016-07-12T01:39:59Z","closed_at":"2016-07-12T01:39:59Z","body":"According to the docs for boto3, [`Object.put()`](http://boto3.readthedocs.io/en/latest/reference/services/s3.html?highlight=s3#S3.Object.put) returns the following keys in the response payload:\r\n\r\n* `Expiration`\r\n* `ETag`\r\n* `ServerSideEncryption`\r\n* `VersionId`\r\n* `SSECustomerAlgorithm`\r\n* `SSECustomerKeyMD5`\r\n* `SSEKMSKeyId`\r\n* `RequestCharged`\r\n\r\nHowever, I'm only seeing this in the response:\r\n\r\n```json\r\n{\r\n    \"ETag\": \"\\\"d5e3e09dd6dab8f428589593c1c7df23\\\"\",\r\n    \"ResponseMetadata\": {\r\n        \"HTTPHeaders\": \"{'etag': '\\\"d5e3e09dd6dab8f428589593c1c7df23\\\"', 'date': 'Tue, 12 Jul 2016 01:08:11 GMT', 'content-type': 'text/plain; charset=utf-8', 'server': 'Python/HTTPretty', 'status': '200', 'last-modified': 'Tue, 12 Jul 2016 01:08:11 GMT', 'content-length': '262', 'connection': 'close'}\",\r\n        \"HTTPStatusCode\": 200\r\n    }\r\n}\r\n```\r\n\r\nMinimal code to reproduce:\r\n```python\r\nimport io\r\n\r\nimport boto3\r\nimport moto\r\n\r\nwith moto.mock_s3():\r\n    session = boto3.Session()\r\n    s3_conn = session.resource('s3')\r\n    s3_conn.create_bucket(Bucket='foo')\r\n    target_obj = s3_conn.Object('foo', 'bar')\r\n    put_result = target_obj.put(\r\n        Body=io.BytesIO(b'Hello, World!'),\r\n        ContentType='text/plain',\r\n        ServerSideEncryption='AES256'\r\n    )\r\n    print(put_result['VersionId'])\r\n```\r\n\r\nResult:\r\n```\r\n>>> import io\r\n>>> \r\n>>> import boto3\r\n>>> import moto\r\n>>> \r\n>>> with moto.mock_s3():\r\n...     session = boto3.Session()\r\n...     s3_conn = session.resource('s3')\r\n...     s3_conn.create_bucket(Bucket='foo')\r\n...     target_obj = s3_conn.Object('foo', 'bar')\r\n...     put_result = target_obj.put(\r\n...         Body=io.BytesIO(b'Hello, World!'),\r\n...         ContentType='text/plain',\r\n...         ServerSideEncryption='AES256'\r\n...     )\r\n...     print(put_result['VersionId'])\r\n... \r\ns3.Bucket(name='foo')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 11, in <module>\r\nKeyError: 'VersionId'\r\n>>> \r\n```\r\n\r\nVersion information:\r\nPython: 3.5.1\r\nboto3 - 1.3.1\r\nbotocore - 1.4.29\r\nmoto - 0.4.25"},"comment":{"url":"https://api.github.com/repos/spulec/moto/issues/comments/231914786","html_url":"https://github.com/spulec/moto/issues/662#issuecomment-231914786","issue_url":"https://api.github.com/repos/spulec/moto/issues/662","id":231914786,"user":{"login":"dargueta-work","id":12239499,"avatar_url":"https://avatars.githubusercontent.com/u/12239499?v=3","gravatar_id":"","url":"https://api.github.com/users/dargueta-work","html_url":"https://github.com/dargueta-work","followers_url":"https://api.github.com/users/dargueta-work/followers","following_url":"https://api.github.com/users/dargueta-work/following{/other_user}","gists_url":"https://api.github.com/users/dargueta-work/gists{/gist_id}","starred_url":"https://api.github.com/users/dargueta-work/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dargueta-work/subscriptions","organizations_url":"https://api.github.com/users/dargueta-work/orgs","repos_url":"https://api.github.com/users/dargueta-work/repos","events_url":"https://api.github.com/users/dargueta-work/events{/privacy}","received_events_url":"https://api.github.com/users/dargueta-work/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T01:39:58Z","updated_at":"2016-07-12T01:39:58Z","body":"I'm an idiot. Forgot to turn on versioning."}}
{"actor":{"display_login":"dargueta-work"}}