Comments (8)
Issue appears to be the handling of multi-word arguments:
https://github.com/CircleCI-Public/aws-s3-orb/blob/master/src/scripts/copy.sh#L7
As you can see, that line clearly indicates that all arguments are to be passed through as a single string. So you are not passing a --content-type
option with application/json
as an argument, you are passing --content-type application/json
as a single big thing.
Issue also happens on sync
commands as defined in the examples because of the same line
https://github.com/CircleCI-Public/aws-s3-orb/blob/master/src/scripts/sync.sh#L7
Unknown options: --acl public-read --cache-control max-age=86400
from aws-s3-orb.
I encountered this one, too.
from aws-s3-orb.
Same: "Unknown options: --acl public-read --cache-control max-age=86400"
from aws-s3-orb.
Same Error
Unknown options: --acl public-read --recursive --cache-control max-age=8640
from aws-s3-orb.
I am facing same issue
#!/bin/bash -eo pipefail
#!/bin/sh
PARAM_AWS_S3_FROM=$(eval echo "${PARAM_AWS_S3_FROM}")
PARAM_AWS_S3_TO=$(eval echo "${PARAM_AWS_S3_TO}")
PARAM_AWS_S3_ARGUMENTS=$(eval echo "${PARAM_AWS_S3_ARGUMENTS}")
if [ -n "${PARAM_AWS_S3_ARGUMENTS}" ]; then
set -- "$@" "${PARAM_AWS_S3_ARGUMENTS}"
fi
if [ -n "${PARAM_AWS_S3_PROFILE_NAME}" ]; then
set -- "$@" --profile "${PARAM_AWS_S3_PROFILE_NAME}"
fi
aws s3 sync "${PARAM_AWS_S3_FROM}" "${PARAM_AWS_S3_TO}" "$@"
Unknown options: --acl public-read
Exited with code exit status 252
CircleCI received exit code 252
from aws-s3-orb.
I am receiving the same error when using the following configuration:
- s3/sync:
arguments: |
--acl public-read \
--delete
from: apps/myapp
to: 's3://my-bucket'
Then I get the error:
#!/bin/bash -eo pipefail
#!/bin/sh
PARAM_AWS_S3_FROM=$(eval echo "${PARAM_AWS_S3_FROM}")
PARAM_AWS_S3_TO=$(eval echo "${PARAM_AWS_S3_TO}")
PARAM_AWS_S3_ARGUMENTS=$(eval echo "${PARAM_AWS_S3_ARGUMENTS}")
if [ -n "${PARAM_AWS_S3_ARGUMENTS}" ]; then
set -- "$@" "${PARAM_AWS_S3_ARGUMENTS}"
fi
if [ -n "${PARAM_AWS_S3_PROFILE_NAME}" ]; then
set -- "$@" --profile "${PARAM_AWS_S3_PROFILE_NAME}"
fi
aws s3 sync "${PARAM_AWS_S3_FROM}" "${PARAM_AWS_S3_TO}" "$@"
Unknown options: --acl public-read --delete
Exited with code exit status 252
If I pass only the --delete
argument, I get no error. If I pass --acl=public-read
I also get no error. The error only seems to occur when I pass more than one argument or an argument with a space.
I downgraded to version 3.0.0
and I do not get the error.
from aws-s3-orb.
Same here, must downgrade to 3.0.0
from aws-s3-orb.
Hey Everyone - I just wanted to follow up here. I fixed this issue with PR #54.
Just a note though, all argument values must be passed in a single line like you have above. Multi-line values will cause jobs to fail.
I'll cutting a new release soon with this fix available. Thanks for your patience on this!
from aws-s3-orb.
Related Issues (20)
- S3 Orb broken on CircleCI Provided (non-python) images based on Ubuntu 20.04 HOT 10
- Update to newer AWS CLI Orb & AWS CLI v2 HOT 2
- Add a Changelog HOT 6
- Windows support HOT 1
- Bump to aws-cli 2.x
- [FEATURE] Support AWS endpoint HOT 1
- Use 1st party badge service
- Question: How to dynamically set the "to" field in /sync HOT 2
- Use AWS_DEFAULT_REGION instead of AWS_REGION by default HOT 1
- Invalid endpoint: https://s3..amazonaws.com at step "S3 Sync" HOT 1
- Add optional override AWS credentials flag HOT 1
- s3 commands can only be executed with the default profile. Need to add --profile flag HOT 1
- 3.1 version not available via orb registry HOT 1
- aws command not found orb 3.1.1 HOT 6
- Upload to non-amazon S3 HOT 2
- Cannot find a definition for command named copy HOT 3
- error: argument --acl: Invalid choice / Unknown options: --acl HOT 1
- about arguments in aws s3 sync HOT 1
- "The config profile (default) could not be found" in 4.0.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-s3-orb.