During playing with AWS EB, i noticed that somehow the Security Group from the previous environment was inherited by the new environment. This creates problem, when you want to terminate the old environment, as the security group already exist on another environment. That’s why i deleted the security group from the new environment. Since, i deleted it from the new environment, i cannot make deployment on the new environment because it gives the following error:
Failed Environment update activity. Reason: Configuration validation exception: Invalid option value: ‘sg-8712f4e3’ (Namespace: ‘aws:autoscaling:launchconfiguration’, OptionName: ‘SecurityGroups’): The security group having id ‘sg-8712f4e3’ does not exist
In order to overcome this, you need to change the EB Security Group from AWS CLI, you cannot do it from AWS Web Console.
Considering you have already AWS CLI installed (http://docs.aws.amazon.com/cli/latest/userguide/installing.html) , you need to the following command in order to change the Security Group:,
aws elasticbeanstalk update-environment –environment-name –option-settings Namespace=aws:autoscaling:launchconfiguration,OptionName=SecurityGroups,Value=””