{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-net/issues/640","repository_url":"https://api.github.com/repos/aws/aws-sdk-net","labels_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/640/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/640/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/640/events","html_url":"https://github.com/aws/aws-sdk-net/issues/640","id":226420288,"number":640,"title":"File uploaded to S3 with space can't be downloaded with GetObjectAsync","user":{"login":"tamhinsf","id":18199401,"avatar_url":"https://avatars0.githubusercontent.com/u/18199401?v=3","gravatar_id":"","url":"https://api.github.com/users/tamhinsf","html_url":"https://github.com/tamhinsf","followers_url":"https://api.github.com/users/tamhinsf/followers","following_url":"https://api.github.com/users/tamhinsf/following{/other_user}","gists_url":"https://api.github.com/users/tamhinsf/gists{/gist_id}","starred_url":"https://api.github.com/users/tamhinsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamhinsf/subscriptions","organizations_url":"https://api.github.com/users/tamhinsf/orgs","repos_url":"https://api.github.com/users/tamhinsf/repos","events_url":"https://api.github.com/users/tamhinsf/events{/privacy}","received_events_url":"https://api.github.com/users/tamhinsf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-04T21:56:43Z","updated_at":"2017-05-04T22:08:33Z","closed_at":null,"body":"AWSSDK.S3/3.3.5.15 in a .NETCoreApp,Version=v1.1 CLI app on OS X.\r\n\r\nCreate an S3 bucket, attach an SNS notification on the bucket for PUT events\r\nConfigure SNS to dump the notification into SQS.\r\nUpload to S3 a file with a space in its name (\"this image.jpg\") to an S3 bucket.\r\nProcess the SQS message that has embedded JSON with the S3 file (key) name in it.\r\n\r\nUse this snippet of code to download the S3 object.\r\n\r\n```\r\n var response = await s3Client.GetObjectAsync(myClass.S3.Bucket.Name,\r\n                          myClass.S3.Object.Key);\r\n```\r\n\r\n(works fine if file is named \"thisimage.jpg\" but not \"this image.jpg\")\r\n\r\nWhen the uploaded file is \"this image.jpg\", the key is returned as \"this+image.jpg\" in the S3 -> SNS -> SQS notification JSON.  However, in the S3 web UI, the key is \"this image.jpg\".   Furthermore, the S3 web UI lists the URL to the file as https://region/bucket/this+image.jpg\r\n\r\nUpon calling GetObjectASync, this exception gets thrown.  Here's the dump:\r\n```\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Amazon.S3.Internal.AmazonS3ExceptionHandler.<InvokeAsync>d__1`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Amazon.Runtime.Internal.ErrorCallbackHandler.<InvokeAsync>d__5`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Amazon.Runtime.Internal.MetricsHandler.<InvokeAsync>d__1`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at CloudtrailToAzure.Program.<GetAndUploadAttachment>d__20.MoveNext() in <path to my code removed>\r\n```\r\n\r\nAm I doing something wrong?"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-net/issues/comments/299323059","html_url":"https://github.com/aws/aws-sdk-net/issues/640#issuecomment-299323059","issue_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/640","id":299323059,"user":{"login":"PavelSafronov","id":1359724,"avatar_url":"https://avatars2.githubusercontent.com/u/1359724?v=3","gravatar_id":"","url":"https://api.github.com/users/PavelSafronov","html_url":"https://github.com/PavelSafronov","followers_url":"https://api.github.com/users/PavelSafronov/followers","following_url":"https://api.github.com/users/PavelSafronov/following{/other_user}","gists_url":"https://api.github.com/users/PavelSafronov/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelSafronov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelSafronov/subscriptions","organizations_url":"https://api.github.com/users/PavelSafronov/orgs","repos_url":"https://api.github.com/users/PavelSafronov/repos","events_url":"https://api.github.com/users/PavelSafronov/events{/privacy}","received_events_url":"https://api.github.com/users/PavelSafronov/received_events","type":"User","site_admin":false},"created_at":"2017-05-04T22:08:33Z","updated_at":"2017-05-04T22:08:33Z","body":"What was the actual exception that was thrown? The stack trace you have listed does not contain that information.\r\n\r\nInitial read suggests that this is an issue in the S3 -> SNS -> SQS data flow, and not specifically a .NET SDK issue. You would need to identify where the + is being injected into the key name (SNS or SQS?) and follow up with that service team, through their respective forums: [SNS forum](https://forums.aws.amazon.com/forum.jspa?forumID=72) or [SQS forum](https://forums.aws.amazon.com/forum.jspa?forumID=12). This repo is for mainly for reporting issues and bugs with the .NET SDK, and from the current information it sounds like this would be an issue with any SDK, so I'm inclined to close this issue."}}
{"actor":{"display_login":"PavelSafronov"}}