Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

"Unknown options" Bitbucket Repository Variable _ Is it a bug?


I'm trying to upload a zip file from bitbucket pipeline to AWS S3.

The step is in bitbucket-pipelines.yml like below:

      - step: #dev-int-module-sam-s3bucket 
name: Deploy to DevEnv
image: amazon/aws-cli
- aws s3 cp s3://$POC_DEPLOY_S3_BUCKET/

 My pipeline failed at this step and the output:


+ aws s3 cp s3://$POC_DEPLOY_S3_BUCKET/
Unknown options: /

The echo returns the right value but cannot use it in "aws s3 cp" command, It's weird.

Other variables works well, such as AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY.

Many thanks for any suggestion.



1 answer

1 accepted

1 vote
Answer accepted

This looks as if there is a space or similar non-printable character at the end of `$POC_DEPLOY_S3_BUCKET`. You could verify with the echo:

echo "---$POC_DEPLOY_S3_BUCKET---"

And for the AWS CLI command, quoting might preserve it (and make the error more visible):

aws s3 cp "s3://$POC_DEPLOY_S3_BUCKET/"

Quoting is most often a good idea when doing variable interpolation to keep arguments together.

Yes, you are right there is a space in the end of S3 bucket name.

When I click on that variable, the mouse pointer appears at the end of string and I cannot see any space on GUI.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,320 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you