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:
- Create the green environment;
- Swap the CNAMEs, and;
- 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
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.