-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws s3 cp silently fails when destination doesn't exist #3659
Comments
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
@mtopolski - Thanks for reaching out. Sorry this issue was closed without a response. In looking into this issue, I found a few other related issues: #2430, #1069, and #1645. In order to investigate this issue better, please provide an example of the command and version of the CLI in use so I can try to reproduce the issue. |
Thank you for reaching out, no worries. I experienced this specifically on Mac OS High Sierra, I haven't tried it with Mojave yet and I'm on Debian now where I get a nice little error. |
@mtopolski - Thanks for your feedback. The error returning appears to be expected behavior from the service which the CLI does not control however I can not reproduce the same results to confirm this. Please rerun the command but a add the |
@mtopolski @justnance Version verified: shabeeb@Shabeeb-LT:/home/shabeeb/workspace/repos/aws-cli$ uname -a ubuntu@XXXXXX:/home/ubuntu/$ uname -a However, aws cli failed to print a failure message if it tries to copy the file to a path which is not existing and not owned by the user. Specifically, cli is unable to create the path due to permission issue, but did not print that as a message Try the command with sudo, it works and does what did it do in the folder owned by the user. What needs to be fixed is print a message if cli fails to cp a file to a folder due to permission issue Command snippets shabeeb@Shabeeb-LT:$ ls /shabeebkhalidtestnofolder/ shabeeb@Shabeeb-LT:$ sudo aws s3 cp s3://amagi-vault-test-storage/core/test.txt /shabeebkhalidtestnofolder/ --profile aws_profile shabeeb@Shabeeb-LT:$ ls /shabeebkhalidtestnofolder/ |
@mtopolski @justnance Please let me know if I can help with implementing this. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
@justnance Can you re-open this issue, this looks like a fair one and I have supplied some more information above as I am also facing the same issue. |
@shabeebk - Thanks for your feedback. I am reopening this issue pending further review and investigation. |
Either there was a regression, or this issue was never fixed in AWS CLI 2. File isn't copied to previously non-existent directory nor are there generated error messages. ubuntu@node1:~$ aws s3 cp s3://<path/toexisting/s3/object> /local_nonexistant_path
download: s3://<path/toexisting/s3/object> to ../local_nonexistant_path
ubuntu@node1:~$ aws --version
aws-cli/2.0.48 Python/3.7.3 Linux/5.4.0-1032-aws docker/x86_64.amzn.2 |
be careful when you use aws cp in script, when the file is reading from the list and there is extra '\r' or '\n', this issue will get you very confused, as there is no error and you can run the aws cp in command line successfully |
Looking into this again. |
@yigal-weinstein and @debu99, I cannot reproduce. If I download a file using the AWS CLI v2 to a path that does not exist, the path is created and the file is copied there. I tested on a Mac:
If this is still an issue for you, please open up a new bug report using the template and provide the required details and I'll look into it further. Thank you! |
|
Made the derp of muscle memory-ing a command I use on a different machine. If the target destination of an s3 cp is specified in a nonexistent directory, you get a silent failure. Not sure if this is intended to punish me for the 30 seconds it took to realize I was on a different box with different dirs, but it would have been nice to have been told off by the cli.
(on Mac OS High Sierra)
The text was updated successfully, but these errors were encountered: