Skip to content

Commit 2dfffba

Browse files
committed
create security group
1 parent 7812f1e commit 2dfffba

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.gitallowed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ id-token: write
99
# Allow CIDR blocks in CloudFormation templates and related files
1010
CidrBlock: "10\.\d{1,3}\.\d{1,3}\.\d{1,3}/\d{1,2}"
1111
DestinationCidrBlock: "0\.0\.0\.0/0"
12+
CidrIp: 127\.0\.0\.1/32
1213

1314
# Java corretto is not a secret
1415
.*java corretto.*

SAMtemplates/main_template.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,15 @@ Resources:
104104
LogRetentionDays: !Ref LogRetentionDays
105105
ExecutePolicyExportName: FHIRValidatorNHSDigitalExecuteLambdaPolicyArn
106106

107+
sgwithoutegress:
108+
Type: AWS::EC2::SecurityGroup
109+
Properties:
110+
GroupDescription: Limits security group egress traffic
111+
SecurityGroupEgress:
112+
- CidrIp: 127.0.0.1/32
113+
IpProtocol: "-1"
114+
VpcId: vpc-078cd165c7acf6f63
115+
107116
FHIRValidatorNHSDigital:
108117
Type: AWS::Serverless::Function
109118
Properties:
@@ -122,6 +131,8 @@ Resources:
122131
Layers:
123132
- !Sub "arn:aws:lambda:${AWS::Region}:580247275435:layer:LambdaInsightsExtension:56"
124133
VpcConfig:
134+
SecurityGroupIds:
135+
- !Ref sgwithoutegress
125136
SubnetIds:
126137
- subnet-0df16e0ac5f81607f
127138
- subnet-0fee41653b358c179
@@ -135,7 +146,6 @@ Resources:
135146
guard:
136147
SuppressedRules:
137148
- LAMBDA_DLQ_CHECK
138-
- LAMBDA_INSIDE_VPC
139149
- LAMBDA_CONCURRENCY_CHECK
140150

141151
Alarms:

0 commit comments

Comments
 (0)