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
4
votes
1 answer

Adding rule to the security group which is created automatically

I am using the AWS CDK to create an ApplicationLoadBalancer which has port 80 accepting external connections. I want to use port 8080 of target to health check port. const lb = new elb.ApplicationLoadBalancer(this, "LB", { vpc: cluster.vpc, …
4
votes
1 answer

Unable to parse cidr_block from terraform data source

I'm trying to create a security group that will automatically append the cidr blocks from 2 subnets based from the data source filtered results. However I'm getting the error when deploying using terraform v12 variant data "aws_vpc" "my-vpc" { …
Lagot
  • 639
  • 1
  • 9
  • 26
4
votes
1 answer

How do I check connectivity/reachability between two resources within a VPC?

I have various resources, eg ECS ENIs, EC2 instances, Transit Gateways, etc. For EC2 I usually SSH in and run curl but this doesn't work with resources like the containers in ECS which cannot be SSH'd into and may not have curl or another network…
wonton
  • 7,568
  • 9
  • 56
  • 93
4
votes
1 answer

aws cli query multiple attributes when these attributes are on the same level

I am using the following to find information about instances associated with a particular Security Group aws ec2 describe-network-interfaces --filters Name=group-id,Values=sg-123456 --output json this returns (partial output) { …
4
votes
3 answers

Alternative to AWS's Security groups in GCP?

Is there an alternative to AWS's security groups in the Google Cloud Platform? Following is the situation which I have: A Basic Node.js server running in Cloud Run as a docker image. A Postgres SQL database at GCP. A Redis instance at GCP. What I…
4
votes
2 answers

Terraform: Allow all internal traffic inside aws security group

I am trying to allow all tcp traffic between instances, otherwise deny all ingress and egress traffic. Problem with "cidr_blocks", in aws console i can select security group but in terraform how can achieve something like that. resource…
Taha Ergun
  • 566
  • 2
  • 7
  • 17
4
votes
2 answers

how to give full access of s3 bucket from ec2 security group

I want to give full access to the S3 bucket from the ec2 security group so all the ec2 instances all associated with that security group can have full access to S3 bucket. also, I am thinking in the right direction or any other method need to use.
4
votes
1 answer

Cannot access my Django page hosted on AWS EC2 instance

I cannot access my Django app on an EC2 instance (host2) in my browser by typing its public DNS name with port number: ec2-public-dns-of-this-instance.compute-1.amazonaws.com:8000 I'm using the same Security Group that my other EC2 instance (host1)…
4
votes
1 answer

Terraform AWS Security group self reference

I am using terraform for AWS resource provisioning. I need to self reference "mySG". from Terraform documentation i can use ingress { from_port = 0 to_port = 0 protocol = -1 self = true } but how…
4
votes
1 answer

Connectivity between 2 Oracle RDS instances in AWS on 2 private subnets in 2 VPCs

Is there a way to connect one database in a private subnet in a VPC to another database in a private subnet in another VPC? Both have same master account but separate accounts each.
4
votes
1 answer

Health check fails after switching from ALB to NLB?

The health check in my target group fails after I switched my load balancer type from "application" to "network". I need to use the network load balancer in order to do a vpc link in api gateway. I attached a security group to my ALB but this is no…
Freid001
  • 2,580
  • 3
  • 29
  • 60
4
votes
1 answer

Create security group at CLI, getting InvalidVpcID.NotFound The vpc ID does not exist

Trying to issue: $ aws ec2 create-security-group --group-name Grp1 --description Grp1 --vpc-id vpc-0e6f748e8c01534bc But I get An error occurred (InvalidVpcID.NotFound) when calling the CreateSecurityGroup operation: The vpc ID…
Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
4
votes
1 answer

AWS - SSH into EC2 created via Cloudformation

I am new to AWS and I wanted to ask this. Is there a way to SSH into an EC2 instance created via Cloudformation? I just wanted to ask since key pairs are generated upon manual creation of EC2 instances in the AWS console right? What if the EC2 was…
4
votes
1 answer

How to grant Athena query permission to a Lambda function?

I have an AWS Lambda function which queries an Amazon Athena database. But I get a permission error when executing the Lambda function: An error occurred (AccessDeniedException) when calling the GetQueryExecution operation: User:…
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
4
votes
1 answer

AWS Cloudformation !Ref SecurityGroup returns an invalid ID

I would like to deploy a SecurityGroup with an SecurityGroup ingress rule via cloudformation. I currently use this in the yaml file: Security Type: AWS::EC2::SecurityGroup Properties: GroupDescription: Securitygroup with access to…