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.

已提问 2 年前705 查看次数
1 回答
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
已回答 2 年前
  • 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?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则