amazon-ami

Can I delete original EC2 instance after creating an image out of it?

回眸只為那壹抹淺笑 提交于 2020-01-06 04:03:26
问题 I've setup a EC2 instance with EBS root. As part of the process, the system has created a snapshot of its EBS volume. My doubt is what happens when I remove the EC2 instance (and its EBS volume). After deleting the EBS volume, will the snapshot still have the full copy of my system? Will I be able to restore a copy of my system in future out of the AMI? Thanks 回答1: If you create an AMI from an EC2 instance, you can terminate the instance and create a new one from the AMI. If you have taken a

How to obtain the Public IP Address on EC2 launch instance request?

对着背影说爱祢 提交于 2020-01-04 01:38:13
问题 I can't figure it out how I can do it: runInstancesRequest.withImageId("ami-53170b32") .withInstanceType("t2.micro") .withMinCount(1) .withMaxCount(1) .withKeyName("mac") .withSecurityGroupIds("sg-49025d2d"); RunInstancesResult runInstancesResult = amazonEC2Client.runInstances(runInstancesRequest); So far everything works fine. Now I want to get the Public IP Address from the recently started instance. How can I do that? I tried: runInstancesResult.getReservation().getInstances().get(0)

Connection refused on new EC2 Instance putty

时光怂恿深爱的人放手 提交于 2019-12-31 03:02:19
问题 I've created an instance of a server on EC2 based on an AMI generated from an existing server. All goes well during the create, and I specify the same key for the new server as the old. However, when I try to connect to the new server via putty, I get a "connection refused" message. Also, I'm unable to ping to the public address, although I selected the "default" group which allows ICMP. The server status is "running". Any ideas why I can't connect? Note that an nmap probe gives this output:

Connection refused on new EC2 Instance putty

倾然丶 夕夏残阳落幕 提交于 2019-12-31 03:02:01
问题 I've created an instance of a server on EC2 based on an AMI generated from an existing server. All goes well during the create, and I specify the same key for the new server as the old. However, when I try to connect to the new server via putty, I get a "connection refused" message. Also, I'm unable to ping to the public address, although I selected the "default" group which allows ICMP. The server status is "running". Any ideas why I can't connect? Note that an nmap probe gives this output:

“Server Refused our key” after launching instance from private EBS AMI

爱⌒轻易说出口 提交于 2019-12-30 02:51:14
问题 I have created my own EBS AMI, shared it with another AWS account, launched NEW instance based on this image with NEW key-pair and now when I am trying to connect to this new instance I am getting error: "Server Refused our key". This is what I did (step by step): Configured new CentOS 6.3 server in my personal account (with my personal key-pair) Created EBS AMI image of that server Shared this image with my client's account Launched new instance in my clients account based on this shared

Create AMI image as part of a cloudformation stack

假装没事ソ 提交于 2019-12-28 12:01:41
问题 I want to create an EC2 cloudformation stack which basically can be described in the following steps: 1.- Launch instance 2.- Provision the instance 3.- Stop the instance and create an AMI image out of it 4.- Create an autoscaling group with the created AMI image as source to launch new instances. Basically I can do 1 and 2 in one cloudformation template and 4 in a second template. What I don't seem able to do is to create an AMI image from an instance inside a cloudformation template, which

Execute dialplan context from command line

*爱你&永不变心* 提交于 2019-12-25 04:26:15
问题 I'm trying to execute an extension from the command line (via asterisk -rx "command") on a context that makes a AGI based query to determine which extension needs to be dialed (these extensions are updated on the DB). It's something like this: [autodialer] exten => 2,1,Answer() exten => 2,n,AGI(database_query.php); Makes a database query and generates vars exten => 2,n,Set(CALLERID(name)=${db_customer_name}); Sets callerid from DB data exten => 2,n,Dial(SIP/${db_customer_extension}); Also,

Saving changes to an EC2 instance without having to register an AMI each time?

风格不统一 提交于 2019-12-24 07:03:33
问题 I wanted to make sure there is no better way to do what I am doing without having to register a new AMI each time I make a change to my instance. My current workflow is the following: Create an AMI with my default settings and all my cronjobs (lets call it A1) Create a cronjob on another instance wich buys a spot request for instance A1 every X hours A1 runs its jobs and automatically shutdown itself Terminate the spot request for the A1 instance Edit the files in A1 if there are changes that

Issue when copy AMI owned by another account

与世无争的帅哥 提交于 2019-12-23 09:32:34
问题 I'm trying to copy an AMI from one account A but owned by another account B. I have previously built this AMI. The account A has launch permissions on the AMI, but when I copy I got this error message : Images from AWS Marketplace cannot be copied to another AWS account. So, I make a DescribeImage and I got this : productCodes item productCode 7w73f3XXXXXXXXXXXXXX /productCode type marketplace /type /item /productCodes I think that my issue come from the productCode & type. Therefore my

How to run a GPU instance using Amazon EC2 Panel?

人盡茶涼 提交于 2019-12-23 08:48:05
问题 I would like to run a Ubuntu GPU instance from the AWS EC2 control panel, but the combo box does not have the g2.2xlarge option to select. It looks like GPU instances are available only for Amazon AMI. When I choose Ubuntu, it does not list GPU. Is there any way to make it work? 回答1: In order to use the g2.2xlarge instance type, you need to first select an AMI that is built with HVM (hardware assisted virtualization). At the time of this writing, the official HVM AMIs for Ubuntu are not