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
0 answers

Cannot send request to Twilio from AWS ECS Task (awsvpc network mode)

I am using AWS - ECS service and I have 5 running tasks on the cluster that has initiated as awsvpc network mode. The problem is that the task is supposed to send request to Twilio for the SMS code but the request to Twilio is being timed out. …
2
votes
1 answer

How to whitelist Zapier IP addresses in AWS RDS security group

I've inherited an AWS RDS instance and it's my first run at trying to manage that side of things in the data world, sorry if I'm misunderstanding or overlooking anything! I'm trying to use Zapier to connect a 3rd party app to our AWS RDS Postgresql…
Tyler Wood
  • 1,947
  • 2
  • 19
  • 29
2
votes
1 answer

Error: Incorrect attribute value type - Terraform datasource(aws_ip_ranges)

I am getting error when i tried to use the terraform datasource (aws_ip_ranges) to get the avaliable ip address ranges for service "ec2". provider "aws" { region = "${var.AWS_REGION}" } variable "AWS_REGION" { default = "eu-west-1" } data…
2
votes
1 answer

AWS EC2: Security group name present in inbound rule's source

I'm investigating security setting of an EC2 instance, and taking a look at security group setting. In one of the inbound rule's source, instead of source IP address, it has it's own security group's ID and Group name. What does this mean?
2
votes
1 answer

EC2 security groups cannot communicate with each other

I have two AWS EC2 instances that are trying to talk to each other over a custom TCP port. Each instance has its own security group, but neither can talk to each other. Here's my setup: EC2 Instance 1 Name: instance-1 Public IP address:…
teuber789
  • 1,527
  • 16
  • 28
2
votes
1 answer

Unable to create AWS security group via Terraform

I am using Jenkins to automate Terraform to create my AWS environment. Although Jenkins has permissions to CreateSecurityGroup, I get this error when Jenkins runs my Terraform main file: * aws_security_group.lambda_security_group:…
Shabina Rayan
  • 389
  • 1
  • 8
  • 22
2
votes
1 answer

How to self-reference SourceSecurityGroup in cloudformation?

i have this code: Mysql: Type: 'AWS::EC2::SecurityGroup' Properties: GroupName: Mysql GroupDescription: MySQL security group SecurityGroupIngress: - IpProtocol: tcp FromPort: 3306 SourceSecurityGroupName: Mysql ToPort:…
2
votes
2 answers

Error: Timed out while waiting for handshake in Lambda logs

The function of SFTP is working locally and it has the correct configuration. The problem is with the logs of Lambda that complains about the configuration I believe by giving me an Error: Timed out while waiting for a handshake. const config = { …
2
votes
0 answers

Cannot curl EC2 instance - Connection refused on port 80

So I have two instances, instance A is part of a security group sg-1 and instance B is part of another security group sg-2. sg-1 has settings to allow all outbound traffic sg-2 has settings to allow traffic from sg-1 on port 80, 9200 and 9300: Yet,…
John Mike
  • 1,895
  • 3
  • 17
  • 26
2
votes
1 answer

EC2 Security Group inbound rule not working as expected

I have an instance that hosts a mongodb service and I am trying to allow incoming traffic for port 27017 from an autoscaling group of instances. I am adding the security group (that has the AG instances) I want to access the specific instance, but I…
2
votes
1 answer

Is there a way to query RDS DB in VPC from Lambda outside VPC without NAT

I was searching for a while for some good design ideas, but haven't found yet the best option. Basically I'm developing serverless API for existing database (RDS MySQL inside VPC, private security group). So I want to query the database from…
2
votes
1 answer

Using two different roles to build resources in one terraform code

Is it possible to create two security groups in two different accounts and reference one of them in the egress rules of other using Terraform in one code file? For instance if we have two VPCs A and B, I want to create two security groups in each of…
2
votes
3 answers

Terraform aws security group revoke_rule_on_delete?

I am getting ~ update in-place Terraform will perform the following actions: ~ aws_security_group.mayanks-sg revoke_rules_on_delete: "" => "false" while running terraform plan and I have no idea what it means and why it is coming searched…
2
votes
1 answer

Unable to run FTP commands from AWS AMI

I want to connect to an FTP using PHP to upload the reports generated. As per the remote server, the FTP needs to be in ACTIVE mode. this is my code: ini_set('display_errors', '1'); error_reporting(E_ALL); $conn_id = ftp_connect('myftpserver.com',…
2
votes
1 answer

How to dynamically modify the security group of a running ECS instance based on the container running in it?

I am trying to deploy different types of docker containers from my ECS cluster. Depending on the type of container, I need to allow certain inbound and outbound port to public. How do I modify the existing ECS instance security group to which the…