<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Victor Farazdagi &#187; EC2</title>
	<atom:link href="http://www.phpmag.ru/category/aws/ec2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpmag.ru</link>
	<description>Phrozn, Phing &#38; Zend Framework Musings</description>
	<lastBuildDate>Fri, 19 Aug 2011 08:47:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to find EC2 Instance ID from w/i the instance</title>
		<link>http://www.phpmag.ru/2009/07/08/how-to-find-ec2-instance-id-from-wi-the-instance/</link>
		<comments>http://www.phpmag.ru/2009/07/08/how-to-find-ec2-instance-id-from-wi-the-instance/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 21:08:12 +0000</pubDate>
		<dc:creator>Victor Farazdagi</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://www.phpmag.ru/?p=668</guid>
		<description><![CDATA[When you have several instances running and performing the same job, it&#8217;s often very helpful to add tasks into SQS with instance ID attached (that way you can also back-verify that item in queue comes from authorized instance). As it comes out, Amazon has already implemented instance meta-data tool, so no need to implement your [...]]]></description>
			<content:encoded><![CDATA[<p>When you have several instances running and performing the same job, it&#8217;s often very helpful to add tasks into SQS with instance ID attached (that way you can also back-verify that item in queue comes from authorized instance). As it comes out, Amazon has already implemented instance meta-data tool, so no need to implement your own! <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1825">EC2 Instance Meta-data Query Tool</a> is very simple to install and use, just follow the on-site instructions and you would be done in no time. Here&#8217;s how I did it:</p>
<pre name="code" class="html">
$ cd /usr/local/src
$ wget http://s3.amazonaws.com/ec2metadata/ec2-metadata
$ chmod u+x ec2-metadata
$ mv ec2-metadata /usr/bin
</pre>
<p>and to find out instance ID:</p>
<pre name="code" class="html">
ec2-metadata -i
</pre>
<p>For other options:</p>
<pre name="code" class="html">
ec2-metadata -help
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.phpmag.ru/2009/07/08/how-to-find-ec2-instance-id-from-wi-the-instance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EC2 Ubuntu &#8211; configuring vsftpd</title>
		<link>http://www.phpmag.ru/2009/07/04/ec2-ubuntu-configuring-vsftpd/</link>
		<comments>http://www.phpmag.ru/2009/07/04/ec2-ubuntu-configuring-vsftpd/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 22:18:18 +0000</pubDate>
		<dc:creator>Victor Farazdagi</dc:creator>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[vsftpd]]></category>

		<guid isPermaLink="false">http://www.phpmag.ru/?p=646</guid>
		<description><![CDATA[I am creating custom AMI from very well prepared Ubuntu 9.04 Jaunty (Server) AMI by Eric Hammond. In process, I decided to ship vsftpd (simple and very stable ftp server) by default with my AMI. So, I went on with installing vsftpd: apt-get install vsftpd I further configured installed FTP server (/etc/vsftpd.conf): anonymous_enable=NO # don't [...]]]></description>
			<content:encoded><![CDATA[<p>I am creating custom AMI from very well prepared <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1952&#038;categoryID=101">Ubuntu 9.04 Jaunty (Server)</a> AMI by Eric Hammond. In process, I decided to ship vsftpd (simple and very stable ftp server) by default with my AMI. So, I went on with installing vsftpd:</p>
<pre name="code" class="html">
apt-get install vsftpd
</pre>
<p>I further configured installed FTP server (/etc/vsftpd.conf):</p>
<pre name="code" class="xml">
anonymous_enable=NO # don't want anonymous access
pasv_enable=YES # enable passive mode
pasv_min_port=50000
pasv_max_port=50100
pasv_address=YOUR_INSTANCE_ASSOCIATED_IP
local_enable=YES # enable local users to login into system
write_enable=YES # enable local users to execute FTP write commands
</pre>
<p>Everything is pretty much simple, probably except for pasv ports. In a nutshell, passive mode means server handles which ports are used for data transfers, and we are using ports in range of 50000-50100. Now any system user should be able to login into your server via ftp. If you need further info regarding laying down the user accounts read <a href="http://www.phpmag.ru/2009/01/19/add-new-ftp-user-via-shell/">my previous post</a>.</p>
<p>One last thing &#8211; data ports should be accessible (which is obvious but I have spent half an hour figuring out why I can login via ftp, but cannot execute LIST command), so configure your authorization group accordingly:</p>
<pre name="code" class="html">
ec2-authorize default -p 50000-50100 #open ports for default group
</pre>
<p>I hope it saves you some time.<br />
Have a nice weekends!</p>
<p>If you need more info on how FTP functions <a href="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch15_:_Linux_FTP_Server_Setup">here</a> is good overview.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpmag.ru/2009/07/04/ec2-ubuntu-configuring-vsftpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

