CircleCI-Public / aws-s3-orb

Integrate Amazon AWS S3 with your CircleCI CI/CD pipeline easily with the aws-s3 orb.
https://circleci.com/orbs/registry/orb/circleci/aws-s3
MIT License
11 stars 20 forks source link

Invalid endpoint: https://s3..amazonaws.com at step "S3 Sync" #28

Closed duyluann closed 2 years ago

duyluann commented 2 years ago

Orb Version circleci/aws-s3@3.0

Describe the bug I followed the guide in https://circleci.com/developer/orbs/orb/circleci/aws-s3. But the failure was observed at step "S3 Sync". I did add AWS_ACCESS_KEY_ID, AWS_REGION, AWS_SECRET_ACCESS_KEY under my IAM user (AmazonS3FullAccess) in the Context.

Here is the config.yaml file:

version: '2.1'
orbs:
  aws-s3: circleci/aws-s3@3.0
jobs:
  build:
    docker:
      - image: 'cimg/python:3.6'
    steps:
      - checkout
      - run: mkdir bucket && echo "lorem ipsum" > bucket/build_asset.txt
      - aws-s3/sync:
          arguments: |
            --acl public-read \
            --cache-control "max-age=86400"
          from: bucket
          to: 's3://awsbucketduyl/circleCI-test/'
      - aws-s3/copy:
          arguments: '--dryrun'
          from: bucket/build_asset.txt
          to: 's3://awsbucketduyl'
workflows:
  s3-example:
    jobs:
      - build

Here is the failure log:

#!/bin/bash -eo pipefail
aws s3 sync \
  bucket s3://awsbucketduyl/circleCI-test/  \
  --acl public-read \
--cache-control "max-age=86400"

Invalid endpoint: https://s3..amazonaws.com

Exited with code exit status 255
CircleCI received exit code 255
duyluann commented 2 years ago

I suppose some issues with defining Context caused this issue. I retried with Env Var in Project Setting, and it passed.