Questions tagged with Amazon EC2
Content language: English
Sort by most recent
How does EC2 hop to a publicly accessible RDS endpoint?
Hey team, say I have an RDS endpoint that's publicly available. I then access this endpoint from an EC2 instance. What happens at the network layer? Does the request go to the public internet? Ideally, the system would know that the we're inside the same vpc and hop right over. How could I confirm this?
Is there way to acces flask app video capture inside ec2 instance [can't find camera by index]
Hello everyone, I have a flask app that streams live video; however, when I try to deploy it to an EC2 instance, I receive the problem "can't find camera by index." Could you guys please assist me with this? I've tried a few internet solutions, but they didn't work.
How to setup an EC2 Security Group to only allow inbound traffic on a port from the API Gateway only
Background: * EC2 instances hosting a REST API microservice * A Network Load Balancer that fronts the EC2 instances with a port 443 Listener that has an ACM issued Private SSL cert installed on it * I have created a VPC link to that NLB. * Created an instance of the API Gateway and defined a method on it. Everything is working fine. I need help with creating a Security Group rule that only allows inbound traffic from the API Gateway on the EC2 port where the API Microservice is exposed. How can I go about doing that? Will appreciate any help with this issue.
How to download EC2 volume to personal computer
I am trying to download the data within the storage volume attached to my EC2 instance to my local computer. I do not want to store it on AWS any more, nor do I want to continue to pay the charges that are necessary for a snapshot volume. Could someone please assist me in doing this? Many thanks
Is there a way to know if number of Load Balancer's backend changed?
I frequently run below script to get actual IP addresses of ec2 instances working as a Load balancer's backend. ``` TG_ELEMENTS=`aws elbv2 describe-target-health --target-group-arn $TG_ARN --query 'TargetHealthDescriptions[*].Target.Id' --profile $PROFILE` for i in $TG_ELEMENTS ; do aws ec2 describe-instances --instance-id $i --query 'Reservations.Instances.PrivateIpAddress' --profile $PROFILE done ``` Mostly returned TG_ELEMENTS list is the same (scalling is not so frequent). I was wondering if there is a way to do some small query to know if target group / load balancer's backend change, and if so do some extra queries to get these IP address list?
Setting up digest authentication
Hi, I'm trying to configure a HTTP digest auth on ec2. I create username and pwd by htdigest and set up authentication in both .htaccess and /etc/httpd/conf/httpd.conf by the following. <Directory "/var/www/html"> AllowOverride All AuthType Digest AuthName "Digest Auth" AuthDigestDomain /var/www/html/secret/ AuthUserFile "/etc/httpd/conf/.digestpass" Require valid-user </Directory> But no authentication is successfully set up as I reload the /secret page. Am I missing anything? Any help would be appreciated!
EC2 Connection Problem
Earlier this year I switched my RDS database from EC2-Classic to a VPC. While I've been able to read/write to the database through my Localhost connection, I am now in the process of replacing my old EC2 connections (I haven't been hosting a web app, but have used EC2 in the past when I've needed to run long and potentially slow PHP scripts). It took a couple of tries, but I finally created a Linux EC2 instance that went through the VPC and I was able to connect via WinSCP and Putty. I changed the file permissions and transferred my code over. I tried to reconnect via Putty and am getting a "Network error: Connection refused" message. When I try to login to WinSCP, I'm getting a "Network Error Connection to ---- Refused." I tried stopping and restarting my EC2 connection and using the new public IP address and I'm getting the same errors. What do you think changed so that I can no longer access this connection? Should I just try the whole process again from the start?