Skip to content
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

Error running awscli upload #5217

Closed
hleroy opened this issue Jul 15, 2024 · 2 comments · Fixed by #5221
Closed

Error running awscli upload #5217

hleroy opened this issue Jul 15, 2024 · 2 comments · Fixed by #5221
Labels

Comments

@hleroy
Copy link
Contributor

hleroy commented Jul 15, 2024

What happened?

Running awscli upload fails with the following error : "aws: error: argument command: Invalid choice, valid choices are:" (followed by a long list of options).

What should've happened instead?

Upload successful on S3.

Additional details

With the exact same setup it works with previous awscli docker image.

e.g.:
"FROM docker.io/amazon/aws-cli:2.15.58" ==> failure
"FROM "docker.io/garland/aws-cli-docker:1.16.140" ==> success

@hleroy hleroy added the bug label Jul 15, 2024
@browniebroke
Copy link
Member

The upload script (as documented here) is located here: https://github.com/cookiecutter/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/compose/production/aws/maintenance/upload

I'm going to assume that it fails at line 23, altough it would have been helpful to get the actual output to confirm it.

@hleroy
Copy link
Contributor Author

hleroy commented Jul 16, 2024

I took more time to understand the error. The upload script is not executed. The Amazon aw-cli image differs from garland image. It has an ENTRYPOINT ["/usr/local/bin/aws"]. The ENTRYPOINT takes precedence over CMD and is always run. So the effective command that is executed is: /usr/local/bin/aws upload. Upload is not a valid choice of argument for the aws command.

We need to clear the ENTRYPOINT in the derived image in order to execute the upload or download scripts passed as parameter. I will give it a try later today and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants