Questions tagged [aws-security-group]

Amazon EC2 Security Groups

Amazon EC2 Security Groups for EC2. A security group acts as a virtual firewall that controls the traffic for one or more instances. When you launch an instance, you associate one or more security groups with the instance.

See Amazon EC2 Security Groups

820 questions
2
votes
1 answer

Terraform 0.11 get VPC CIDRs from data source and pass to security_group_ingress_rule resource

My requirement is I need to get the CIDR address for vpc-foo and vpc-bar and pass on to the resource "aws_security_group_rule" "ingress" I tried with the below code: data "aws_vpcs" -> Get the ID for a given VPC data "aws_vpc" -> make a list with…
2
votes
0 answers

Cross-account VPC peering connection to RDS

I have two AWS accounts (A and B). Each of them has a VPC with no overlapping CIDR blocks, both are in the same region. I have successfully created a VPC peering connection between them (which is active). The requester and receiver both allow remote…
2
votes
1 answer

The "create new ec2 instance" wizard is not allowing me to select existing Security Groups

I have a carefully crafted and secure Default Security Group that should be used for this new ec2 instance. However none of my existing SG's are included in the Configure Security Group screen. Instead two new ones are shown that are worse than…
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560
2
votes
1 answer

AWS Security Group Private IP spoofing

I am using AWS security group inbound rules to only give private resources HTTP access to an EC2 instance, but public SSH access to my IP address For this the instance requires a public IP address I know that IP spoofing is quite easy to be done,…
2
votes
1 answer

Do I really need a VPC if I can use AWS security groups to secure my MongoDB EC2 instance?

I am really stuck here deciding whether I really need a VPC to deploy my MongoDB instance (a graphQL server also) into on AWS? I'm working on a project that's going to have a GraphQL server to serve a mobile-app along with a MongoDB instance to…
2
votes
2 answers

attaching different Security Groups to different EC2s

Requirement:- I have multiple group(say 2 groups) of EC2s where each group contain 6 EC2. and I have to attach different SG to each group. Example:- Group1 contains :- Head1, child :EC2-1, EC2-2....6 and need to attach SG1 Group2 contains :- Head2,…
2
votes
1 answer

AWS Fargate cannot access application over Public DNS name

This is a follow up to my previous question. I'm successfully able to access the public IP over fargate. However, after trying to attach Application load balancer, I cannot access application over public DNS. The registered target always show…
2
votes
1 answer

How to whitelist AWS IP-Range in an EC2 security group?

Please help We blocked all the outgoing traffic by removing 0.0.0.0/0 and added only our VPC so as our application connects to the EC2 Now the problem is EC2 is not able to communicate with any of AWS Services itself; we are not able to use SSM,…
2
votes
2 answers

Does AWS Security Group see only Private addresses when it is specified as a source/destination in inbound or outbound rules?

I have 2 instances in the same AZ and both have Public IP addresses. I have a added security group to both instances allowing inbound ICMP ping with source as same security group. When I ping the Private IP address, ping succeeds. However, when I…
2
votes
1 answer

Nsetools API's not working when deployed on ec2 instance

I am planning to use nsetools library with python to get top gainers and top losers. the code is working fine on local and getting me all the information but when I deployed same code on ec2 instance the code nse.get_top_gainers() is getting timed…
2
votes
2 answers

Attaching AWS security group to multiple EC2 instances

I am spinning up multiple Amazon EC2 instances and need to attach a Security Group. I am able to achieve it for one EC2 instance but looking for solution for multiple EC2s. I am using TerraForm 0.12. Please let me know how can I use data resource :-…
2
votes
2 answers

Unable to delete security group: An error occurred (DependencyViolation) when calling the DeleteSecurityGroup operation

I am trying to delete security groups that has 0 interfaces and is not being referred in the ingress rule of any other security group using boto3. But I am getting error: An error occurred (DependencyViolation) when calling the DeleteSecurityGroup…
2
votes
2 answers

Cannot connect to AWS Transfer S3 SFTP server - might need to set security group

I'm trying to set up an SFTP server managed by AWS that has a fixed IP address which external clients can whitelist in a firewall. Based on this FAQ this is what I should do: You can enable fixed IPs for your server endpoint by selecting the VPC…
Alex Hall
  • 34,833
  • 5
  • 57
  • 89
2
votes
3 answers

Why specify cidr range in Inbound IP address for aws security groups

For example, in AWS security groups, we speicfy a IP address that can login, but then we put /24 or /32 for IPv6 Is that the only reason for specifying the cidr range, or can we do more configuration? e.g. From source: 32.232.232.11/24. why have…
user4433284
2
votes
2 answers

Unable to connect to any of the specific MySQL hosts with AWS Lambda to RDS MySQL

I have an AWS Lambda function for an API. I have a test function inside of the API that returns a "Success" string so I know that I can hit the API from my machine (Postman). The Lambda API is inside of my VPC. I have public and private subnets. …