Where am I able to see the launch template used for an Ec2 machine in AWS? - amazon-ec2

I would like to know my launch template, which I used for my ec2 machine.
I know, that the is function, which is able to achieve this by get-launch-template-data, but I would like to see it in the management console.

Related

Amazon AWS ElasticBeanstalk custom AMI

I am trying to use a custom AMI in AWS Beanstalk. I manually launched a default Amazon ElasticBeanstalk image in EC2 (ElasticBeanstalk-Tomcat7-32bit-20110913-1132 (ami-278e4c4e)) and created my custom AMI from that. I then go to ElasticBeanstalk, launch an Environment and once it's up and running, I switch to this custom AMI in the Environment's configuration.
The health status is green. But my webapp does not get deployed on the instance:
[root#ip-***-***-***-*** ~]# ls -l /opt/tomcat7/webapps
total 0
Tomcat is running:
[root#ip-***-***-***-*** ~]# /etc/init.d/tomcat7 status
Tomcat 7 is running.
I am puzzled about why my app does not get deployed. Does anyone know what's going wrong?
well, the Beanstalk AMIs use a init script to copy your application from S3, and deploy it to the container (Tomcat).
I would recommend:
1. Take a look on CloudInit logs at: /var/log/cloud-init.log.
2. If everything looks fine (or even empty), edit the script at /etc/sysconfig/cloudinit to add some traces just to check if the CloudInit script is executed, or is failing at some point.
I'm sorry no being able to give you a better help, but is hard from here to know what is happening!
What I normally do, is launch a Beanstalk Instance (not a Instance with a Beanstalk AMI), then I do the modifications on that instance, and to finish I create my custom AMI to do what you are trying to achieve.
I meanwhile figured out the problem. When you create your own AMI from one of the Amazon predefined Beanstalk images, and you don't actually make any changes to the file system (install anything, create files, etc.), AWS will NOT create a new snapshot while creating a custom AMI. The created AMI will not work in Beanstalk then.
As long as you make any changes to the default image before you create your own custom AMI, everything should work fine.

Want to Deploy Task on AWS

I want to deploy my task (which is implemented in Hive) on AWS EC2.
I just read about the AWS, I came to know that we can create our own environment on EC2.
I am completely new to AWS. So I don't know anything about it
How to create such environment there?
I also read that we can import our VM image?
But for that the connector needed for it having .ova extension. If I download it, How to install it? (having .ova extension)
All this things is possible on AWS Free instance (creating our own environment and also VM Import)
Please guide me through this if you know about this.
To setup an instance on Amazon EC2 you might want to go through following guide: http://docs.amazonwebservices.com/AWSEC2/latest/GettingStartedGuide/Welcome.html
Regarding importing your own VM image, you might want to go through following link: Amazon EC2 VM Import. They do support importing images of VMWare, Hyper V etc. In the link you will see 2 options how you can import your image:
Command line option
Amazon EC2 VM Import Connector for VMware vCenter
Personally I know that using command line option has option to provide image file in format specific to your virtual machine software. You can see details of command line options at ec2-import-instance API reference.
Importing an image is free as there is no charge for data coming in to AWS. But there is a change for storing an instance created using image import. Every service has some sort of charge associated with it like per hour charge for instance until instance is up. So those charges are applicable regardless you are importing your image or not. Please see Amazon EC2 pricing at EC2 pricing

Manager application for ec2

I am currently experimenting with Amazon EC2 and use standard ec2 console. The web app is ok but I want a better solution. I want to be able to ssh to the instances, monitor them, possibly attach with a debugger etc. Are there any better alternatives to the tool?
You should be able to login to any EC2 instance via SSH using key files and work with it like if it were an ordinary server. To do it you have to create a key pair, download public key to your local machine, and ensure you've selected that key-pair while launching new instance. You are free to install any software you like on the instance, so the way how you would monitor you instance is completely up to you (if you decide not to use AWS console).
Apart from the web console there are also Amazon EC2 API tools (a bunch of ec2 scripts to be run from Linux console) and the Query API. The later is considered to be the most flexible way to manage your cloud infrastructure. There are binding for EC2 in many scripting languages including Python (boto), Perl (Net::Amazon::EC2), Ruby (amazon-ec2 gem), node.js (aws2js).
Otherwise there's no better solution just because EC2 is IaaS service and it is meant to be equally good for almost any task. For your particular needs you'll have to develop or organize your own environment which will suite your unique needs.
Edit:
Since today it is possible to log in to running EC2 Linux instances from AWS web console:
Our third announcement today is about a new feature in the AWS console that makes it even easier for you to use Amazon EC2 Linux instances. Customers have been asking us to enable the ability to log into their instances directly from the AWS console. Starting today, you can log in to your Linux instances from the EC2 console without the need to install additional software clients. Please see the Amazon EC2 Getting Started Guide for details on how to use this new functionality.

Should I use a regular server instead of AWS?

Reading about and using the Amazon Web Services, I'm not really able to grasp how to use it correctly. Sorry about the long question:
I have a EC2 instance which mostly does the work of a web server (apache for file sharing and Tomcat with Play Framework for the web app). As it's a web server, the instance is running 24/7.
It just came to my attention that the data on the EC2 instance is non persistent. This means I lose my database and files if it's stopped. But I guess it also means my server settings and installed applications are lost as they are just files in the same way as the other data.
This means that I will either have to rewrite the whole app to use amazon CloudDB or write some code which stores the db on S3 and make my own AMI with the correct applications installed and configured. Or can this be quick-fixed by using EBS somehow?
My question is 1. is my understanding of aws is correct? and 2. is it's worth it? It could be a possibility to just set up a regular dedicated server where everything is persistent, as you would expect. Would love to have the scaleability of aws though..
If you use an EBS volume with your EC2 instance, you can mount/dismount them to have persistent storage. You can also use Amazon RDS to handle your database too which is handy (but can be slightly on the pricier side.)
So a way to think of it is:
Your EC2 instance: Get the OS set up exactly like you'd like it along with your web application - basically, get your static stuff all in place.
EBS volume: That can be mounted and can be used for things like user uploads.
RDS instance: This is a dedicated database server with no hassles. It's nice - I use a MySQL RDS and it automatically makes two daily backups, and is scalable like EC2 instances.
Amazon Web Service is a better approach at hosting your applications Jon. You have a basic understand of AWS but you need to know that you can also launch an instance that is persistent. Just launch an instance of a persistence AMI. Also you can install you database,webs server on the instance like a regular server. There is probably just minimal differences from running an Ec2 instance and a dedicated server. If you have any other questions you can contact me.

How to sync my EC2 instance when autoscaling

When autoscaling my EC2 instances for application, what is the best way to keep every instances in sync?
For example, there are custom settings and application files like below...
Apache httpd.conf
php.ini
PHP source for my application
To get my autoscaling working, all of these must be configured same in each EC2 instances, and I want to know the best practice to sync these elements.
You could use a private AMI which contains scripts that install software or checkout the code from SVN, etc.. The second possibility to use a deployment framework like chef or puppet.
The way this works with Amazon EC2 is that you can pass user-data to each instance -- generally a script of some sort to run commands, e.g. for bootstrapping. As far as I can see CreateLaunchConfiguration allows you to define that as well.
If running this yourself is too much of an obstacle, I'd recommend a service like:
scalarium
rightscale
scalr (also opensource)
They all offer some form of scaling.
HTH

Resources