"Unknown options: s3://***/" error when trying to upload to S3 through Github Actions

0

I'm trying to upload to s3 using Github Actions, however even though I have the necessary secrets in my Github Actions and the seemingly the correct IAM permissions, I am consistently getting "Unknown options: s3://***/". If you have any idea what may be the problem, I would greatly appreciate it!

name: Upload Website

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: jakejarvis/s3-sync-action@master
        with:
          args: --acl public-read --follow-symlinks --delete
        env:
          AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: "ap-northeast-1"
          SOURCE_DIR: "Resume Website"
3 Answers
0

A possible solution would be to use ' ' instead of " ". this worked for me. For example:

          AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: 'ap-northeast-1'
          SOURCE_DIR: 'Resume Website'

I hope it has been useful to you.

profile picture
EXPERT
answered 10 months ago
  • Thank you for response, though unfortunately I'm still getting the same error with single quotes

0

Have your tried specifying your bucket without the s3:// so instead of s3://example-bucket it’s example-bucket as the name.

I’ve only ever used bitbucket pipelines for this, just the error doesn’t like s3:// in the bucket name

profile picture
EXPERT
answered 10 months ago
  • I tried it without the s3:// in Github Actions secrets as well as just putting the bucketname in the AWS_S3_BUCKET section, but Im still getting the same error

0

How did you resolve this?

answered 12 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions