{"action":"reopened","issue":{"url":"https://api.github.com/repos/aws/aws-cli/issues/2379","repository_url":"https://api.github.com/repos/aws/aws-cli","labels_url":"https://api.github.com/repos/aws/aws-cli/issues/2379/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/2379/comments","events_url":"https://api.github.com/repos/aws/aws-cli/issues/2379/events","html_url":"https://github.com/aws/aws-cli/issues/2379","id":199995208,"number":2379,"title":"aws s3 cp for urls with spaces results in fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden","user":{"login":"iteratelance","id":792408,"avatar_url":"https://avatars2.githubusercontent.com/u/792408?v=4","gravatar_id":"","url":"https://api.github.com/users/iteratelance","html_url":"https://github.com/iteratelance","followers_url":"https://api.github.com/users/iteratelance/followers","following_url":"https://api.github.com/users/iteratelance/following{/other_user}","gists_url":"https://api.github.com/users/iteratelance/gists{/gist_id}","starred_url":"https://api.github.com/users/iteratelance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iteratelance/subscriptions","organizations_url":"https://api.github.com/users/iteratelance/orgs","repos_url":"https://api.github.com/users/iteratelance/repos","events_url":"https://api.github.com/users/iteratelance/events{/privacy}","received_events_url":"https://api.github.com/users/iteratelance/received_events","type":"User","site_admin":false},"labels":[{"id":85959960,"url":"https://api.github.com/repos/aws/aws-cli/labels/feature-request","name":"feature-request","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-01-11T03:31:52Z","updated_at":"2018-04-06T20:16:43Z","closed_at":null,"author_association":"NONE","body":"This error occurs when trying to execute the command on urls with the following format:\r\n\r\n` aws s3 cp s3://mybucket/with+space.zip my.zip`\r\n` aws s3 cp s3://mybucket/with%20space.zip my.zip`\r\n\r\nHowever this works as expected:\r\n\r\n` aws s3 cp \"s3://mybucket/with space.zip\" my.zip`\r\n\r\nMy best guess is that it's the security token being generated incorrectly because in the debug logs I see the following generated \r\n\r\n```\r\nx-amz-security-token:XXXXXXX\r\n/mybucket/with%2Bspace/my.zip\r\n```\r\n\r\nThis bug is hard to track down because if you're using automation you'll pull your hair out as to why you're getting a forbidden response on folders that have spaces.  At the very least I'd expect a 404 error.\r\n\r\nPerhaps worth noting that I first discovered this error via AWS CodeDeploy.  I'm assuming that it might use this library on EC2 instances when pulling S3 builds."}}
{"actor":{"display_login":"jamesls"}}