May 2019
Intermediate to advanced
308 pages
8h 5m
English
To automate network access control list (NACL) creation, we first need to create a NACL resource in the template. We will name it PrivateSubnetACL and attach it to simpleVPC with "VpcId" : { "Ref" : "simpleVPC" }. We are also adding the tags, as with all the other resources:
"PrivateSubnetACL" : { "Type" : "AWS::EC2::NetworkAcl", "DependsOn" : "simpleVPC", "Properties" : { "VpcId" : { "Ref" : "simpleVPC" }, "Tags" : [ {"Key" : "purpose", "Value" : "demo"} ] } },
Next, we create the inbound "Egress" : "false" allow "RuleAction" : "allow" rule for the NACL. We will name it PrivateSubnetACLIn, make it dependent on the NACL we created before with "DependsOn" : "PrivateSubnetACL", and allow protocol 6 (TCP) with
Read now
Unlock full access