Comments (6)
@kelvintaywl, sorry I forgot to update. To solve this, I used aws-cli solely as a workaround (without aws-s3). I haven't tried the suggested solution by @kelvintaywl
from aws-s3-orb.
@kelvintaywl This worked to unblock me! Thank you very much.
from aws-s3-orb.
Hi @rodolfoIOET
would your project on CircleCI be a private repository?
If so, can you submit a support ticket here @ https://circleci.zendesk.com/hc/en-us/requests/new ?
From there, we (Support team) can dig deeper and look at your CircleCI build to advise further.
Thank you!
from aws-s3-orb.
I am running into the same thing. For me! it looks like when you pass the when:
parameter in IT IS NOT passing to the "Install AWS CLI - latest" AND "Configure AWS Access Key ID" steps. These steps are notably missing when the step before fails.
- run:
name: "Check the pre-existence of the deploy"
command: |
echo "${DEPLOY_PATH}"
sideshow staging is_deployed ${DEPLOY_PATH}
- when:
condition:
equal: [ master, << pipeline.git.branch >> ]
steps:
- backup_deploy:
bucket: staging
current: "${DEPLOY_PATH}"
when: on_success
- aws-s3/copy:
arguments: |
--cache-control "public, max-age=15" \
--acl bucket-owner-full-control
from: build/code-snippet.js # build/${FILENAME}
to: "s3://staging/sideshow/${DEPLOY_PATH}"
when: always
from aws-s3-orb.
hi @qops1981 @rodolfoIOET, thanks for reporting this.
I believe the issue is because:
- currently, the
aws-s3/copy
command does not propagate itswhen
parameter toaws-cli/setup
:
aws-s3-orb/src/commands/copy.yml
Lines 56 to 75 in d76b756
- this means that when
aws-s3/copy
is used withwhen: on_fail
orwhen: always
, if the earlier step beforeaws-s3/copy
failed, this internalaws-cli/setup
step will not run since the last step exited non-zero
To solve this, i think we would need to propagate the when
parameter value to aws-cli/setup
.
We would then expect the aws-cli/setup
to also respect this when
value.
However, this is tricky too, since the aws-cli/setup
command does not currently accept a when
parameter:
https://circleci.com/developer/orbs/orb/circleci/aws-cli#commands-setup
This likely requires some coordination on our team (CircleCI) to update both Orbs.
In the meantime, to unblock your cases, we can pre-emptively install the AWS CLI first.
As such, can you try to modify your .circleci/config.yml as shown below?
# snippet; incomplete .circleci/config.yml
orbs:
aws-s3: circleci/[email protected]
+ aws-cli: circleci/[email protected]
jobs:
example:
docker:
- image: cimg/python:3.10
steps:
+ - aws-cli/setup
- run: echo "some required commands that may fail"
- aws-s3/copy:
- install-aws-cli: true
+ install-aws-cli: false
# or, when: always
when: on_fail
...
from aws-s3-orb.
Hey All!
We've come out with a new standard for all AWS orbs where a user will be required to authenticate first. This means that you'll have to run the aws-cli/setup
command first to authenticate first before using any of the S3 commands.
Thanks @kelvintaywl for your guidance!
Best,
Brian
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
- "Unknown options" error when running copy HOT 8
- 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.