When creating a security group, allowAllOutbound parameter seems to be ignored
See original GitHub issueWhen I create a security group and specify allowAllOutbound=false, a security group with the default egress rule that allows all ports is created anyway. It is called …InstanceSecurityGroup… I can’t find a way to change that.
const securityGroup = new ec2.SecurityGroup(parent, 'SecurityGroup', {
vpc,
description: 'xxxx',
allowAllOutbound: false
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
When creating a security group, allowAllOutbound parameter ...
When I create a security group and specify allowAllOutbound=false, a security group with the default egress rule that allows all ports is ...
Read more >Security Group Examples in AWS CDK - Complete Guide
A complete example of how to create a Security Group in AWS CDK, and edit its inbound and outbound rules.
Read more >CDK EC2 SecurityGroup - AWS Documentation - Amazon.com
No information is available for this page.
Read more >Amazon EC2 instance can't update or use yum - Stack Overflow
Looks like the host is having trouble contacting the yum server. Make sure the instance has outbound internet access (check security groups etc)....
Read more >Cdk use existing vpc - Seba Online
The build and deployment of the application if fully automated using AWS CDK. ... Create a VPC; Create a security group and add...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@varunshaji @moehlone The outbound rule you’re seeing (ICMP 252, port 86, destination 255.255.255.255/32) is intentionally set here: https://github.com/aws/aws-cdk/blob/master/packages/@aws-cdk/aws-ec2/lib/security-group.ts#L509 From the comments:
Apparently there has to be some rule set to override the “allow all” default. Same net effect as having no outbound rules, just more confusing when you first notice it.
I had to google why it was creating that rule. Maybe could be used the same example AWS is using
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#aws-properties-ec2-security-group--examples--Remove_the_default_rule