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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,461,958
Community Members
 
Community Events
176
Community Groups

Interact by Passing Commands to Pipelines Service Container

Edited
Deleted user Mar 03, 2022

Hi there, 

 

I've spent ages googling and looking at all of the documentation I can find and I need some help so I'm calling in the big guns and posting on the forums :). 

I am using a terraform image for 99% of my pipeline but there is one command I need the aws cliv2 for. I was hoping to use that image as a service container butevery configuration I try ends with the same error 

 

"aws: error: the following arguments are required: command"

 

in all of the documentation I've seen this seems like it should work in theory and I am just making a silly syntax mistake somewhere... any guidance would be much appreciated here 

 

I've pasted the relevant bitbucket-pipelines.yml snippets below. 

image: hashicorp/terraform

pipelines:
default:
- step:
name: New Code Detected
services:
- aws-cli
script:
- echo "New code pushed to ${BITBUCKET_BRANCH}"
- aws-cli aws help
definitions:
services:
aws-cli:
image: amazon/aws-cli



any advice on how I can get this working? 

 

EDIT: I tried the same with the atlassian/pipelines-awscli  image and got the same error.

1 answer

0 votes
Norbert C Atlassian Team Mar 07, 2022

Hi @[deleted] 

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you.

Unfortunately it seems, that the aws-cli images are not working as services and it's not able to run the aws commands. When I had the following configuration in bitbucket-pipelines.yml file, I was able to run the "aws help" command:

image: amazon/aws-cli

pipelines:

default:

- step:

name: New Code Detected

script:

- echo "New code pushed to ${BITBUCKET_BRANCH}"

- aws help

As a workaround, can I ask you to use the following image? This image contains both terraform and aws-cli, so I believe with this image, you can achieve what you would like to: https://hub.docker.com/r/zenika/terraform-aws-cli

Please let me know how it goes.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events