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

0

I am trying to complete the AWS Cloud Resume Challenge. 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://***/" (specifically) in line 12. If you have any idea what may be the problem, I would greatly appreciate it!

GitHub Cloud Resume Challenge

2개 답변
0
수락된 답변

The error "Unknown options: s3://***/" indicates that the command you're using in your Github Actions workflow might be misinterpreting the S3 URL.

some troubleshooting steps to fix this:

  1. Check the format of your S3 URL: Make sure the S3 URL you're providing only includes the bucket name and the object key (path within the bucket), without the s3:// prefix. Github Actions should handle that part.

Example (Incorrect): aws s3 cp file.txt s3://your-bucket-name/path/to/object.txt

Example (Correct): aws s3 cp file.txt your-bucket-name/path/to/object.txt

  1. Consider using a dedicated upload action: Several Github Actions are specifically designed for uploading files to S3. These actions often simplify the process and handle the S3 URL formatting for you. Examples include:

actions/upload-artifact@v3 (https://github.com/actions/upload-artifact) aws-actions/aws-s3-upload@v1 (https://github.com/marketplace/actions/upload-s3).

  1. Ensure there are no typos in your bucket name, object key, or any environment variables referenced .
profile pictureAWS
akad
답변함 한 달 전
  • Where would I insert my S3 URL?

0

❓ Are all the required secrets correctly configured in your GitHub repository settings, and does the IAM user linked to these secrets have the appropriate permissions for S3 operations?

profile picture
전문가
답변함 한 달 전
  • Yes it is however I am still stuck.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠