Questions tagged with Amazon EC2
Content language: English
Sort by most recent
After compiling the RTL, I can get a DCP. Then, a AFI will be generated using the aws ec2 create-fpga-image API. I wonder if a bitstream is generated during this process. If generated, whether the bitstream is encrypted.
Hi AWS,
I have created an EC2 instance and its key pair using terraform code. The terraform code for the same is:
```
resource "aws_instance" "test_ec2_instance_production" {
ami = var.ami_id
instance_type = var.instance_type
subnet_id = aws_subnet.public_subnet.0.id
vpc_security_group_ids = [aws_security_group.test_security.id]
tags = {
Name = "${var.default_tags.project_name}-${var.default_tags.environment}-ec2-instance"
}
key_name = var.generated_key_name
associate_public_ip_address = true
monitoring = true
}
// Create key-pair for EC2 instance
resource "tls_private_key" "prod_key" {
algorithm = "RSA"
rsa_bits = 4096
}
resource "aws_key_pair" "generated_key" {
key_name = var.generated_key_name
public_key = tls_private_key.prod_key.public_key_openssh
provisioner "local-exec" {
command = <<-EOT
echo '${tls_private_key.prod_key.private_key_pem}' > test-prod-keypair.pem
chmod 400 test-prod-keypair.pem
EOT
}
}
```
I have generated the keys using the command ssh-keygen -t rsa -m PEM.
Now I am trying to provide the private key in the SSH server configuration setting of Jenkins and I am getting this error: **jenkins.plugins.publish_over.BapPublisherException: Failed to connect and initialize SSH connection Message [Auth fail]**
Also I am not able to login into the EC2 using SSH connection command as the key is broken and getting this error:
**ec2-user@ec2-x-xxx-xx-xxx.us-east-2.compute.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)**
Now the issue is this is a production environment and the key is broken. Is there any way to replace the key with a new one without terminating the instance as long way down I need to have a proper RSA key which I can add in the Jenkins SSH remote host to build my pipeline. Also you know Jenkins don't accept Open SSH key format.
Also I need to know the steps to generate the rsa key and to copy the key file into the .pem file which we are going to use for ssh connection with EC2. Please help!
How open port 25 from instance
HI,
Anyone faced this problem while learning AWS Terraform ?
I am following the Book to practice the Terraform I am getting below error.
url: (7) Failed to connect to <<<removed Public IP Address of EC2 >> port 8080 after 49 ms: Couldn't connect to server
Please advise if there is any recent upgrade ?
My Code is below
provider "aws" {
region="us-east-2"
}
resource "aws_security_group" "instance" {
name="terraform-example-instance"
ingress {
from_port=8080
to_port=8080
protocol="tcp"
cidr_blocks=["0.0.0.0/0"]
}
}
resource "aws_instance" "example" {
ami="ami-0a695f0d95cefc163"
instance_type="t2.micro"
vpc_security_group_ids=[aws_security_group.instance.id]
user_data=<<-EOF
#!/bin/bash
echo "Hello, World" > index.html
nohup busybox httpd -f -p 8080 &
EOF
tags={
"Name" = "terraform-example"
}
}
Hi,
I followed a youtube video and setup a OPENVPN EC2 and tunneled my home network through that and it was working fine.
Now after a month later, the VPN server is still running fine and I am seeing payment amount increasing and forcasted for next month but when I log into my aws account and go to EC2 I don't see any instances running. 0 instance. but the VPN is working fine.
So, I wonder how to be sure that it is my VPN is what I am using and not a hacker's VPN now. And why the bill is adding up?
Any help for this novice will be appreciated.
Thanks,
Repost
Running an EC2 app. The site started to show a net::ERR_CONTENT_LENGTH_MISMATCH error for a couple of javascript files.
https://sqlplusplus-tutorial.couchbase.com/tutorial/#1
Any guidance on how to troubleshoot or resolve this would help.
Thank you,
James
Hi guys,
I'm trying to set up data sync between 2 EC2 instances.
I'm setting up the locations, setting up mount to /
Then I create the task, specifying the folder I would like to move. Tasks run, and it shows completed, but no new data appeared on my target instance. On the task, I see only one file was moved, which I can't find.
Does anyone have any idea how to set it up?
why do every time I create 3cx instance for a customer. after installation I found 2 instances instead of 1?
while we create 3 instances of EC2 under free trial then what should be the instance running time for each instance? I know the aws provide 750hrs for ec2 but confused in case of multiple instances.
After creating a pipeline with CodePipeline with all the attendant resources (CodeCommit, CodeDeploy, EC2, IAM Roles, etc.), my pipeline has run successfully but I still can't access my EC2 instance online ("This site can't be reached error").
My code is very simple, I just want to run a starter app to learn how to use the pipeline; in fact, I'm using the SampleApp_Windows structure downloaded from this Github repo https://github.com/quangit/aws-codedeploy-samples-master/tree/master/applications. I didn't change anything in the code and my pipeline is showing success in all of the stages. But when I try to access the EC2 instance via the public DNS address provided, nothing happens.
I've already gone through the process of successfully deploying the SampleApp_Linux from the same Github repository and was able to access the app there (and since I'm using the same security group on my new Windows instance I don't think it's a firewall issue), so I really don't know what the issue could be other than there's something about how a Windows server works with CodePipeline that I don't know.
Any ideas would be appreciated!
If I disable, block, or delete keys in the external key store, how long will my data still be accessible in the cloud?
The only info I found was: "Caching of these keys can vary from 5 mins to 24 hrs, depending on the AWS service."
Does anyone have more details? How long does caching last for the different AWS services like EC2, S3, ...?
Hi All. i am taking AWS Cloud Technical Essentials, and when i try to setup my ec2 instance everything apears to launch.
it shows running and 2/2 checks. but i cant get to the public ip, to find the page holder.
ive cleared my cache, tried a incognito browser, tried from a separate network all the same results.
i also cant ping the public ip. i have followed thru the lab, and all i end up with is "this site cant be reached" . sorry 0 knowledge of virtual systems
also im sorry if this is in the wrong place :)