Questions tagged [aws-ec2]
The aws-ec2 tag has no usage guidance.
76
questions
0
votes
0
answers
7
views
How to import an aws_spot_instance_request into Terraform?
I'm looking for a way to import an aws_spot_instance_request into Terraform.
I already made a Spot Request on AWS console, now I would like to put this request on my code. How can I do that?
In the ...
0
votes
0
answers
11
views
AWS WAF create custom rules
Attackers are repeatedly using the same off-the-shelf exploit to attack my server. It doesn't work because my server is patched and I have some server side modules to prevent the exploit.
However I ...
1
vote
1
answer
55
views
I can log into my AWS/EC2 instance but my developer can't
I created a new EC2 instance, generated a key with PuTTYgen and was able to successfully log in on my machine using Pageant and PuTTY as well as WinSCP. My security group is open to all IPs, but my ...
0
votes
0
answers
17
views
AWS AppStream is unable to push session script logs to s3
I have configured session scripts to log stdout and stderr to s3 bucket as described in https://docs.aws.amazon.com/appstream2/latest/developerguide/use-session-scripts.html#enable-S3-bucket-storage-...
0
votes
0
answers
25
views
Why does EC2 allow QEMU/KVM 32 bit VMs to run, but not 64 bit?
The setup is EC2 with 8 cores and 32GBs of memory running Ubuntu 22.04 Desktop. Virtual Machine Manager has been installed. I downloaded 32 bit and 64 bit Windows 10. I'm able to create a VM using 32 ...
0
votes
1
answer
28
views
Can't access my ec2 public ip outside rdp
I'm using IIS to host my app and I use port 80, on my RDP if I enter the IP address it redirect me to my app but if I use the IP address outside RDP is not working. I checked with XAMPP and is working ...
0
votes
0
answers
46
views
AWS EC2 EBS: btrfs partition and FS automatically resized by just increasing the EBS volume size?
I had to expand the size of an EC2 EBS root volume that uses btrfs (Fedora 38 Server), so I did the following:
Stopped the EC2 instance
Expanded the EBS volume via the EC2 console
Started the EC2 ...
1
vote
0
answers
33
views
AWS EC2 auto-scaling Windows server: how to set the hostname ("computername")?
I have an elaborate framework for autoscaling UNIX servers to configure their hostname with a script on launch (startup) using an NFS (EFS) where they look up what their hostname should be, then set ...
0
votes
1
answer
158
views
How to connect to AWS EC2 serial console without access keys
My goal is to connect to the serial console of an EC2 instance, using SSH, e.g. from a laptop, using the best modern security practices in setting it up.
The AWS documentation (https://docs.aws.amazon....
0
votes
1
answer
31
views
AWS T3 Linux VM becomes unresponsive when CPU reaches 80%
I am running a t3 small instance on AWS. Whenever its CPU usage reaches 80%, it becomes unresponsive, and we are unable to access it via SSH. After stopping and starting the instance, everything comes ...
0
votes
0
answers
72
views
EC2 instance Status Check failed and server stopped working
I am using an AWS EC2 instance (t3.xlarge) running on Ubuntu server 18.04.6 LTS, which was working fine. But suddenly I encountered an error where the instance status check failed "Instance ...
3
votes
3
answers
804
views
How to install and configure Redis server on Amazon Linux 2023 (AL2023)?
Amazon Linux 2023 is loosely based on Fedora 34, 35 and 36 as per aws:
https://docs.aws.amazon.com/linux/al2023/ug/relationship-to-fedora.html
However redis package is not available in AL2023, instead ...
0
votes
1
answer
41
views
How to Include Elastic IP on EC2 on my VPN
I am able to ping and access SSH on my EC2 using Private IPs.
However I want to access the SSH using the Public IP ( elastic IP ).
Is that possible?
note: my VPN step up and EC2 is under 1 VPC
I have ...
0
votes
0
answers
27
views
Can't connect to cognito using the AWS CLI
I have created an instance running bare AL2023. This instance has an IAM role asociated which has a single policy
{
"Version": "2012-10-17",
"Statement": [
...
0
votes
1
answer
50
views
Dynamic propagation from AWS SSM Parameters (to EC2 ASGs etc)
In AWS, can a Systems Manager Parameter Store parameter (with the aws:ec2:image data type) be referenced directly in the AMI field of a Launch Template used by an EC2 Auto Scaling Group, so that the ...
0
votes
1
answer
261
views
How to setup a NAT Gateway together with a VPN in AWS
I have a VPN setup following this guide. I connect to the VPN from my Mac and I can confirm that both, my Mac as well as EC2 instances do have access to internet. However, for this to work, all my EC2 ...
0
votes
1
answer
177
views
AWS VPN with split tunnel cannot connect to Internet after connecting to AWS VPN
AWS VPN with split tunnel enabled. When I connect to the VPN with the AWS VPN Client, I lose Internet on my Mac endpoint. However, I do seem to reach the VPN as I see my connection in the AWS VPN ...
-2
votes
1
answer
81
views
How could I connect to AWS Windows EC2 using RDP?
I have some question about connect using RDP with Windows EC2.
I create two EC2 instances: one is Windows 2016 platform, and the other one is Arch Linux.
I also create one VPC with allow any ...
0
votes
0
answers
55
views
AWS poor performance compared to DigitalOcean's
Why is my Apache2 server with PHP-FPM experiencing significantly lower performance on AWS EC2 instances compared to DigitalOcean Droplets? Despite similar hardware specifications and configurations, ...
0
votes
0
answers
35
views
Can you specify the SSM parameter store as a target in an AWS Security Group egress rule?
I would like to tightly restrict outbound network level access from groups of EC2 instances. For these instances, I need to allow access to the Parameter Store. I also need to allow access to S3. ...
0
votes
1
answer
87
views
Can't connect from AWS EC2 instance to AWS SES endpoint
Disclaimer: my AWS networking skills are basic.
I have an EC2 Windows server instance in a private subnet. I connect via a VPN. FOR TESTING I put it in a Security Group that allows all IPV4 TCP ...
0
votes
1
answer
58
views
OpenVPN on AWS (works in NAT mode but doesn't work in Routing mode)
I have a brand new VPC (10.0.0.0/16) with 3 public subnets (pointing to an IGW) and 3 private subnets (with a NAT GW in each). I have deployed an OpenVPN appliance in the public subnet and configured ...
0
votes
0
answers
22
views
EC2 instance crashing when retrieving many files from S3
I have a very annoying problem with my EC2 instance. I have a ubuntu EC2 instance and in a Python Notebook cell I do a loop for retrieving many files from s3 (actually not that very much, around 300 ...
0
votes
0
answers
61
views
Calling API from Https website to AWS
I have a website with https consider https://example.com which wants to call an API from an AWS EC2 instance consider http://ec2.##.##.##/get-users. I am getting Connection Refused when I do so but in ...
0
votes
0
answers
59
views
aws t3.small nginx gzip response time is slow?
I am having php web application on t3.small ec2 instance.
webserver : nginx
gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
...
0
votes
1
answer
52
views
AWS storage slow simultaneous reads
We are finding that using AWS file storage (EFS or EBS using GP2 or GP3) from an EC2 instance is very slow when doing simultaneous reads. Here's an example:
I'm reading 30 binary files into memory, ...
0
votes
0
answers
39
views
IAM user cannot see EC2 resources?
given the following role, why can my test IAM user not see any EC2 instances? When I login with the test user and go to EC2 I just see "You are not authorized to perform this operation".
As ...
0
votes
1
answer
328
views
AWS CLI : How to use "--query" to get output from nested JSON
I am using aws-cli v2 to get the --query output from AWS Describe-volumes. In this, I am trying to get the volume id, size, Instance ID, state. Instance ID is nested in the AWS Describe-volumes.
...
0
votes
0
answers
28
views
EC2 instance connect - impersonating anyone on the server by default
I am looking at ec2 instance connect and it seems it just allows you to impersonate any user that exists on host.
How is that useful or secure? In what scenario would I want to allow this ...
1
vote
0
answers
50
views
AWS Ec2 instance (ubuntu) instance not showing elastic ip address
I have allocated an elastic IP address to an AWS Ec2 (ubuntu) instance. But when i am running the 'ip address show' command, it only displayes the public IPV4 address, not showing the Associated ...
-1
votes
1
answer
102
views
sharing the memory of a program between ec2 instances [duplicate]
Is it possible to combine the memory of ec2 instances? For example, let's say that I run a program that requires 2gb ram to run on one ec2 with 1gb ram instance,
can I somehow share that program's ...
0
votes
1
answer
133
views
How do I configure AWS EC2 instances to selectively bypass default DNS resolver in all regions?
I have a network of AWS EC2 instances. Most of them are using the default VPC's DNS resolver to prevent exfiltration and to resolve internal domains (using a custom TLD). That all works fine.
However, ...
0
votes
0
answers
186
views
SCP to an EC2 instance is failing but SSH works
I'm trying to scp a jar file to an EC2 instance that hosts a service I'm working on. I'm able to ssh into that EC2 instance without issue. When I attempt to scp the file with the following command:
...
1
vote
0
answers
110
views
AWS EC2 - Difference between adding interface via Bota3 vs adding via web interface
Apologies for dupes, I assume this is not novel, but I can't get the phrasing right to get an answer.
I have a lambda python script provided by AWS from this example (python script reproduced below to ...
0
votes
0
answers
25
views
403 error coming after creating AMI on original UNIX instance
I was creating an image of my EC2 instance and after starting the process of image creation, the original instance is giving 403 forbidden error message. For reference, the original instance has 200GB ...
0
votes
1
answer
88
views
Host multiple websites on AWS Auto-Scaling Group with EFS
I hope this is a simple question.
Currently I have an Apache2 webserver on Ubuntu with multiple websites.
The basic structure of the Apache is
/etc
/apache2
/sites-available --> the .conf ...
1
vote
0
answers
94
views
AWS EC2 NGINX SSL Issue after activating the SSL
We have this weird issue on our AWS EC2 instance, when we activate the "AWS SSL Certificate" on that specific EC2 instance it will not work and instead, it will just show the default "...
1
vote
0
answers
59
views
How to spin up AWS computing resource on demand within 10 seconds delay apart from using Lambda?
Upon user request, my application has to run a CPU heavy application that requires 6 CPU processes. To reduce latency and speed up development, I choose a monolith approach. Therefore, I simply put ...
1
vote
1
answer
819
views
Copying files to/from EC2 instance using SSM alone (no SSH or S3 bucket)
I'm trying to setup a ready-to-run terraform template for some performance testing. It creates two EC2 instances in the same cluster placement group and preinstalls a bunch of tools. I don't know the ...
0
votes
1
answer
195
views
My website is working when https://www.example.com but not when https://example.com
I have purchased the domain from Godaddy.
My website is working when
https://www.example.com
example.com
www.example.com
Not working when
https://example.com
I want to know where I need to add ...
0
votes
0
answers
136
views
AWS EC2 CPU Spike for 1 minute
Im running a aws linux 2 EC2 instance and noticed throughout the month there will be sudden spikes in the CPU usage where it gets close to 90% and then drops off. However looking at the average over 2 ...
0
votes
1
answer
499
views
AWS: error on import of OVF/OVA file from a VMWare ESXi
My goal is to migrate a VM from VMWare to AWS EC2.
I exported the "OVF+VMDK" file from VMWare ESXI 6.5.
I also converted to an OVA file to be able to test both OVF and OVA format.
I followed ...
0
votes
1
answer
35
views
How to check if Route53 will speed up my website?
I have an aws ec2 instance in N.Virginia, an Ubuntu machine with everything inside (mysql as well as apache).
Basically all these while, I'm running it on one instance alone, with just image backups ...
1
vote
0
answers
154
views
Setting up deployment for .net 6 to AWS EC2
(Lowly dev trying to play at devops)
I've successfully created an EC2 instance on an Amazon Linux platform.
I have a .net 6 API running locally, with the code base sitting in a private GitHub repo.
I ...
0
votes
0
answers
39
views
Custom domain pointed at elastic IP does not have correct SSL certificate
So i have this problem that is bothering me for some time. Now i created SSL certificate with LetsEncrypt and its for my custom domain. Lets say example.com. Now i have set this certificate for load ...
0
votes
0
answers
49
views
How to route all incoming/outgoing traffic to eht1 instead of eth0 on aws linux 2 instance
I am new to the AWS Linux environment, I have added a new network interface (eth1) with my AWS Linux 2 instance. now I want to route all of my incoming and outgoing traffic through this interface(eth1)...
0
votes
1
answer
304
views
ssh: connect to host ec2-x-xxx-xxx-xx.compute-1.amazonaws.com port 22: Connection timed out
I connected to my ec2 instance successfully earlier. However, when trying to connect again, I got this error:
ssh: connect to host ec2-x-xxx-xxx-xx.compute-1.amazonaws.com port 22: Connection timed ...
0
votes
1
answer
141
views
MYSQL server on EC2 is sometimes refusing to connect
I have hosted a MySQL DB on AWS EC2 instance(t2.micro, ubuntu, free tier). I am able to connect to it and store data. But most of the time, I am unable to connect to it via workbench or my app. But my ...
0
votes
0
answers
201
views
AWS ECS in private subnets with autoscaling not working without NAT gateway, why?
I have stack in cloudformation, containing ECS cluster with autoscaling EC2 instances, running in private subnets. ECS is covered by ALB (in public subnets). Container instances get images from AWS ...
0
votes
0
answers
118
views
How to reduce the aws ebs root volume on windows instance
How can we reduce the size of the aws ebs root volume of windows instance. I have the current size of 250 MB, I want to reduce it back to 30 GB since the applications doesn't need 250 GB.