How to deploy to single instance Elastic Beanstalk worker environment using CodePipeline?

1

I use CodePipeline's AWS Elastic Beanstalk action provider to deploy my application to my load-balanced Elastic Beanstalk webserver environment. I now want to do the same for my single instance worker environment. However, using this action provider results in the following error:

Deployment completed, but with errors: Failed to deploy application. Service:AmazonCloudFormation, Message:Template format error: Unresolved resource dependencies AWSEBV2LoadBalancer, AWSEBV2LoadBalancerTargetGroup in the Resources block of the template

To my understanding, the Elastic Beanstalk action provider uses a CloudFormation template under the hood which apparently assumes my environment uses a load-balancer, which I am not. Is there any way to change this directly? Or should I manually create a CloudFormation template that omits these resources? Are there any examples on how to write such a template, or can I find the template that the Elastic Beanstalk action provider uses somewhere?

Thanks in advance.

asked a year ago206 views
1 Answer
0

With the AWS Elastic Beanstalk Compose Environments API, you can create and update groups of Elastic Beanstalk environments within a single application. When you create a group of environments with the Compose Environments API, Elastic Beanstalk creates dependent environments only after their dependencies are up and running.

~/application
|-- webapp
|   `-- env.yaml
`-- worker
    `-- env.yaml

With each directory containing an environment definition file env.yaml with the source code for each.

Detailed docs at Creating and updating groups of Elastic Beanstalk environments

RoB
answered a year ago
  • Thanks for responding. I think this answer isn't what I am looking for. I am looking to deploy the same app to both the webserver and worker environment using CodePipeline. I doubt your answer would allow this, or do I understand it incorrectly?

  • Ya, I'm not sure this is answering the question. Don't understand why this is so difficult in beanstalk. Web tier with a load balancer, worker tier with no load balancer. How do you deploy the same code to both environments via eb cli?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions