Elastic Beanstalk not terminating environment from pipeline

0

Hello,

I am building a CodePipeline to deploy application versions on an Elastic Beanstalk environment using the Blue/Green strategy. I have created three lambda functions in NodeJs to:

  1. Create the green environment;
  2. Swap the CNAMEs, and;
  3. Reswap and terminate the green environment.

The third lambda function successfully swaps the CNAMEs back, but it fails to terminate the green environment, I am receiving the following error: "InvalidParameterValue: Cannot terminate environment named TesteNovosLambdasGreen. It is currently pending deployment". I can, however, terminate the environement from the console, from the aws cli and directly from the lambda function. I also have a lambda function in Python that does exactly the same and it terminates the environment successfully.

Does anyone know what this error means and how can I fix it?

Regards, Silas F. Lopes

silasl
已提问 2 年前321 查看次数
1 回答
0

Hey Silas,

Based on the error message, it can the case that the environment was still on updating state when trying to delete it. To provide a more specific support, I would recommend you to reach out to AWS Support and share with your Lambda logs and Pipeline logs, we can take a closer look to see what was happening exactly. Thanks!

支持工程师
已回答 2 年前
  • Hello Zhiyuan.

    Thanks for the answer. I have already reached out to AWS Support. They have suggested I post on AWS forums because they were not able find a reason for this error.

    The deployment does not occur in this environment. It is just created to receive traffic while my Blue environment receives the new application version. Besides, my Lambda function checks the environment state before terminating it and I have a Python version of this Lambda that executes successfully

    Regards.

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

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

回答问题的准则