diff --git a/src/foremast/pipeline/construct_pipeline_block_lambda.py b/src/foremast/pipeline/construct_pipeline_block_lambda.py
index <HASH>..<HASH> 100644
--- a/src/foremast/pipeline/construct_pipeline_block_lambda.py
+++ b/src/foremast/pipeline/construct_pipeline_block_lambda.py
@@ -64,7 +64,7 @@ def construct_pipeline_block_lambda(env='',
     user_data = generate_encoded_user_data(env=env, region=region, app_name=gen_app_name, group_name=generated.project)
 
     # Use different variable to keep template simple
-    instance_security_groups = DEFAULT_EC2_SECURITYGROUPS[env]
+    instance_security_groups = sorted(DEFAULT_EC2_SECURITYGROUPS[env])
     instance_security_groups.append(gen_app_name)
     instance_security_groups.extend(settings['security_group']['instance_extras'])
added sorted to make a copy of the list so global variable is not mutated