Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How execute shell script in my private ec2 instance from bitbucket pipeline

chilkoti
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 17, 2023

Hi,
I am creating pipeline to run bash script in ec2 instance, What is the easiest way to execute on Ec2 instance.

the ec2 instance is in private IP not public. I can pull code from ec2 instance. Not sure how can i run bash script from bibucket pipeline.
Mostly seen documentation for code deploy. is this only solution?

1 answer

0 votes
Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 17, 2023

Hi @chilkoti

You can use ssh directly or use ssh-run which is a pipe.

chilkoti
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 18, 2023

Hi @Saxea _Flowie_ 
I didn't understand how this will work on my private ec2 instance from https://bitbucket.org/org/repo/pipelines/
The private subnet will not accessible from out side of the network.




Thanks

Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2023

Hi @chilkoti

My bad, I misread the private access. In this case you would need an approach that pulls the artifacts, and Code Deploy is likely your best bet.

Like chilkoti likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events