def create_security_groups()

in dcv_session_manager_infrastructure/dcv_session_manager_infrastructure_stack.py [0:0]


    def create_security_groups(self, vpc, alb_security_group):
        ef_security_group = ec2.SecurityGroup(self, "EFSecurityGroup",
                                              vpc=vpc,
                                              description="SecurityGroup for EF ",
                                              security_group_name="EF SecurityGroup",
                                              allow_all_outbound=True,
                                              )
        dcv_security_group = ec2.SecurityGroup(self, "DCVSecurityGroup",
                                               vpc=vpc,
                                               description="SecurityGroup for DCV ",
                                               security_group_name="DCV SecurityGroup",
                                               allow_all_outbound=True,
                                               )
        ef_security_group.add_ingress_rule(
            alb_security_group, ec2.Port.tcp(8443), "allow http access from the vpc")
        ef_security_group.add_ingress_rule(
            dcv_security_group, ec2.Port.all_traffic(), "allow local access ")
        dcv_security_group.add_ingress_rule(
            alb_security_group, ec2.Port.tcp(8443), "allow dcv access ")
        dcv_security_group.add_ingress_rule(
            ef_security_group, ec2.Port.all_traffic(), "allow local access ")

        return ef_security_group, dcv_security_group