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

Deploy to AWS step fails in the pipeline

Harita Patel October 1, 2019

An error occurred (InvalidParameterValue) when calling the UpdateEnvironment operation: No Environment found for EnvironmentName = 'HpDevopsExercise-env'.

1 answer

0 votes
Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2019

Hey @Harita Patel , looks like you're using the aws-elasticbeanstalk-deploy pipe. As the error message says, there is no elasticbeanstalk environment for HpDevopsExercise-env. Let's start by first verifying that the environment does actually exist for your application. Also remember to check if the region where your application is created is the same region you pass to the pipe. Check out the Prerequisites section here https://bitbucket.org/atlassian/aws-elasticbeanstalk-deploy/src/master/ as well.

Harita Patel October 2, 2019

Appreciate your response @Alexander Zhukov I kept verifying in AWS that the environment does exist and it does hence used HpDevopsExercie-env as the ENVIRONMENT_NAME string in my bitbucket-pipeline.yml file. I also tried using the env id instead but that didn't work either. Below is what I see in AWS for the exercise that was setup for me. I also did check the region that I'm using is accurate with the access key and it is. I was very close to creating a new environment but I figured since someone else setup this exercise for me and the env name/id are listed as shown below, env already exists. Am I missing anything else?

AWS.JPG

Also, here's my yml file that I created for your reference.bitbucket-pipelines.yml.JPG

Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2019

@Harita Patel on your screenshot I can see that the URL of the environment has a different region part (us-east-2) and you pass the us-east-1 to the pipe. So basically you have your environment in a different region. You probably should use us-east-2 as AWS_DEFAULT_REGION

Screenshot from 2019-10-02 22-27-11.jpg

Like Harita Patel likes this
Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2019

@Harita Patel on your second screen you've posted your AWS credential, you should remove them from AWS, as someone might be able to use them to create resources in your account and you'll be charged for these resources. 

Like # people like this
Harita Patel October 3, 2019

Thanks @Alexander Zhukov the build still failed after changing the region but I figured it out. We had to add the S3_BUCKET in the yml file as well.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events