From 31b04d7f21846071d6bd9fc1c79f5f6847577c23 Mon Sep 17 00:00:00 2001 From: Ran Isenberg <60175085+ran-isenberg@users.noreply.github.com> Date: Thu, 1 Aug 2024 09:44:42 +0300 Subject: [PATCH] chore: optimize (#9) Co-authored-by: Ran Isenberg --- cdk/service/chat_bot_construct.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cdk/service/chat_bot_construct.py b/cdk/service/chat_bot_construct.py index b422b90..a3c1d14 100644 --- a/cdk/service/chat_bot_construct.py +++ b/cdk/service/chat_bot_construct.py @@ -128,13 +128,6 @@ def __init__(self, scope: Construct, identifier: str, waf_acl: wafv2.CfnWebACL, enforce_ssl=True, ) - # Security group for the Fargate service - security_group = ec2.SecurityGroup(self, 'ChatSecurityGroup', vpc=vpc) - - # Allow inbound traffic on 443 (HTTPS) from any IP - security_group.add_ingress_rule(ec2.Peer.any_ipv4(), ec2.Port.tcp(443), 'Allow HTTPS traffic from the internet') - security_group.add_ingress_rule(ec2.Peer.any_ipv6(), ec2.Port.tcp(443), 'Allow HTTPS traffic from the internet (IPv6)') - # Create a Fargate service and make it publicly accessible fargate_service = ecs_patterns.ApplicationLoadBalancedFargateService( self, @@ -148,7 +141,6 @@ def __init__(self, scope: Construct, identifier: str, waf_acl: wafv2.CfnWebACL, domain_name=self.network_assets.full_domain, domain_zone=route53.HostedZone.from_lookup(self, 'BaseZone', domain_name=self.network_assets.domain_name), desired_count=1, - security_groups=[security_group], load_balancer_name='chatbot-application-lb', redirect_http=True, circuit_breaker=ecs.DeploymentCircuitBreaker(enable=True, rollback=True),