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년 전740회 조회
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?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠