<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>AWS on iMil.net</title>
    <link>http://imil.net/blog/tags/aws/</link>
    <description>Recent content in AWS on iMil.net</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 11 Jun 2017 11:42:00 +0000</lastBuildDate>
    <atom:link href="http://imil.net/blog/tags/aws/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Score!</title>
      <link>http://imil.net/blog/posts/2017/score/</link>
      <pubDate>Sun, 11 Jun 2017 11:42:00 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2017/score/</guid>
      <description>&lt;p&gt;This happened:&lt;/p&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;!-- raw HTML omitted --&gt;</description>
    </item>
    <item>
      <title>Launch the AWS Console from the CLI or a mobile phone</title>
      <link>http://imil.net/blog/posts/2017/launching-the-aws-management-console-from-the-cli/</link>
      <pubDate>Sat, 20 May 2017 15:48:47 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2017/launching-the-aws-management-console-from-the-cli/</guid>
      <description>&lt;p&gt;At &lt;em&gt;${DAYJOB}&lt;/em&gt; I happen to manipulate quite a few &lt;a href=&#34;https://aws.amazon.com/&#34;&gt;AWS&lt;/a&gt; accounts for different customers, and I find it really annoying to log out from one web console, to log into a new one, with the right credentials, account ids and &lt;a href=&#34;https://aws.amazon.com/iam/details/mfa/&#34;&gt;MFA&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://aws.amazon.com/blogs/security/how-to-enable-cross-account-access-to-the-aws-management-console/&#34;&gt;Here&lt;/a&gt; you can read a good blog post on how to enable cross account access for third parties and use a basic script to open a web browser to switch from one account to the other.&lt;br&gt;&#xA;I liked this idea so I pushed it a bit further and wrote &lt;a href=&#34;https://github.com/iMilnb/awstools/tree/master/kriskross&#34;&gt;this small piece of code&lt;/a&gt; which allows you not only to switch accounts, but also to simply open any &lt;a href=&#34;https://aws.amazon.com/&#34;&gt;AWS&lt;/a&gt; account from the command line.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ansible and AWS ASG, a (really) dynamic inventory</title>
      <link>http://imil.net/blog/posts/2016/ansible_and_aws_asg/</link>
      <pubDate>Fri, 05 Aug 2016 14:07:00 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2016/ansible_and_aws_asg/</guid>
      <description>&lt;p&gt;I found myself searching ridiculously too long to achieve what I believed was a simple task: to apply an &lt;a href=&#34;http://www.ansible.com&#34;&gt;Ansible&lt;/a&gt; &lt;em&gt;role&lt;/em&gt; to newly created  instances&amp;hellip; started by an &lt;a href=&#34;https://aws.amazon.com/autoscaling/&#34;&gt;Auto Scaling Group&lt;/a&gt;. If you&amp;rsquo;re used to &lt;a href=&#34;http://www.ansible.com&#34;&gt;Ansible&lt;/a&gt; you know that it relies on an &lt;em&gt;inventory&lt;/em&gt; to apply a &lt;code&gt;playbook&lt;/code&gt;, but obviously, when you&amp;rsquo;re firing up &lt;em&gt;EC2&lt;/em&gt; instances with the same &lt;code&gt;playbook&lt;/code&gt;, you are not able to know what will be your virtual machines IP addresses, nor can &lt;a href=&#34;http://docs.ansible.com/ansible/intro_dynamic_inventory.html&#34;&gt;ec2.py&lt;/a&gt;, the recommended method to deal with dynamic inventories.&lt;/p&gt;</description>
    </item>
    <item>
      <title>EC2 VPN connection informations (updated)</title>
      <link>http://imil.net/blog/posts/2015/ec2-vpn-connection-informations/</link>
      <pubDate>Sat, 06 Jun 2015 11:19:42 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2015/ec2-vpn-connection-informations/</guid>
      <description>&lt;p&gt;For a mysterious reason, &lt;em&gt;EC2 VPN&lt;/em&gt; connection informations are stored in &lt;em&gt;XML&lt;/em&gt; within the &lt;em&gt;JSON&lt;/em&gt; data retrieved by either &lt;a href=&#34;https://github.com/boto/boto3&#34;&gt;boto&lt;/a&gt; or the &lt;a href=&#34;https://github.com/aws/aws-cli&#34;&gt;awscli&lt;/a&gt; command line tool.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s a quick &lt;em&gt;python&lt;/em&gt; snippet to convert those datas in a convenient, easily parsable &lt;code&gt;dict&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;p&gt;Combining this piece of code with &lt;a href=&#34;http://jinja.pocoo.org/docs/dev/&#34;&gt;jinja2&lt;/a&gt; could help you generate &lt;a href=&#34;http://ipsec-tools.sourceforge.net/&#34;&gt;racoon&lt;/a&gt; (or whatever &lt;em&gt;IPSec&lt;/em&gt; software you use) on the fly.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://gist.github.com/iMilnb/ba7b46dfc854544bf3c8&#34;&gt;here&lt;/a&gt;&amp;rsquo;s a complete example of an automatic generation for &lt;a href=&#34;http://ipsec-tools.sourceforge.net/&#34;&gt;racoon / ipsec&lt;/a&gt; configuration files using the previous snippet, along with &lt;a href=&#34;http://jinja.pocoo.org/docs/dev/&#34;&gt;jinja2&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Latency based Alias DNS record in Route53</title>
      <link>http://imil.net/blog/posts/2015/latency-based-alias-dns-record-in-route53/</link>
      <pubDate>Thu, 04 Jun 2015 23:05:56 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2015/latency-based-alias-dns-record-in-route53/</guid>
      <description>&lt;p&gt;Yes, I know I write a lot about &lt;em&gt;AWS&lt;/em&gt; these days, but you know, obsession is my thing.&lt;/p&gt;&#xA;&lt;p&gt;So as I wrote earlier, I generate my &lt;em&gt;CloudFormation&lt;/em&gt; templates using &lt;a href=&#34;https://github.com/cloudtools/troposphere&#34;&gt;troposphere&lt;/a&gt;, and the one thing I had to finish today was to register a latency based Alias record on &lt;a href=&#34;http://aws.amazon.com/documentation/route53/&#34;&gt;Route53&lt;/a&gt; for an &lt;a href=&#34;http://aws.amazon.com/documentation/elastic-load-balancing/&#34;&gt;ELB&lt;/a&gt;. While &lt;a href=&#34;http://aws.amazon.com/documentation/route53/&#34;&gt;Route53&lt;/a&gt; &lt;em&gt;GUI&lt;/em&gt; is fairly easy to use, I&amp;rsquo;ve been stuck on its programmatic emanation for quite a while, so here&amp;rsquo;s a &lt;a href=&#34;https://github.com/cloudtools/troposphere&#34;&gt;troposphere&lt;/a&gt; definition of such a &lt;em&gt;CloudFormation&lt;/em&gt; object:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rock your CloudFormation with troposphere and boto</title>
      <link>http://imil.net/blog/posts/2015/rock-your-cloudformation-with-troposphere-and-boto/</link>
      <pubDate>Thu, 04 Jun 2015 10:55:48 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2015/rock-your-cloudformation-with-troposphere-and-boto/</guid>
      <description>&lt;p&gt;So you&amp;rsquo;re using &lt;a href=&#34;http://aws.amazon.com/fr/cloudformation/&#34;&gt;AWS CloudFormation&lt;/a&gt; in order to bring up complex infrastructures; haven&amp;rsquo;t you already told yourself that instead of writing down all those &lt;code&gt;JSON&lt;/code&gt; lines by hand, you could bring more fun to your architect life?&#xA;I did, and I found a way to programmatically design a whole architecture using &lt;a href=&#34;https://github.com/cloudtools/troposphere/&#34;&gt;troposphere&lt;/a&gt; and &lt;a href=&#34;http://boto3.readthedocs.org/en/latest/&#34;&gt;boto3&lt;/a&gt;.&#xA;Simply put, &lt;a href=&#34;https://github.com/cloudtools/troposphere/&#34;&gt;troposphere&lt;/a&gt; gives you bindings in order to generate &lt;em&gt;CloudFormation&lt;/em&gt;&amp;rsquo;s &lt;code&gt;JSON&lt;/code&gt; template, but hey, it&amp;rsquo;s python, meaning that you can create loops, use conditions and even dynamically build objects.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Reserved Instances mystery solved</title>
      <link>http://imil.net/blog/posts/2015/reserved-instances-mystery-solved/</link>
      <pubDate>Thu, 28 May 2015 11:40:56 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2015/reserved-instances-mystery-solved/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://en.wikipedia.org/wiki/Amazon_Web_Services&#34;&gt;AWS&lt;/a&gt; is an amazing piece of cloud, but the documentation is not always clear. I&amp;rsquo;ve been scratching my head trying to understand how &lt;a href=&#34;http://aws.amazon.com/ec2/purchasing-options/reserved-instances/&#34;&gt;Reserved Instances&lt;/a&gt; pricing was applied to actual instances. First I was searching for a &amp;ldquo;Launch a Reserved Instance&amp;rdquo; button, or even &amp;ldquo;Associate this Reserved Instance&amp;rdquo;, but no, nothing. I found the official documentation to be quite evasive so I took my chance on the &lt;code&gt;##aws&lt;/code&gt; IRC channel on &lt;code&gt;irc.freenode.net&lt;/code&gt;; there I found a very friendly community that explained me (and many more after me) the simple truth: &lt;em&gt;It&amp;rsquo;s all automagic!&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>aws cli and jq filtering</title>
      <link>http://imil.net/blog/posts/2015/aws-cli-and-jq-filtering/</link>
      <pubDate>Wed, 20 May 2015 23:07:16 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2015/aws-cli-and-jq-filtering/</guid>
      <description>&lt;p&gt;Long time no see huh? ;)&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m diving into &lt;a href=&#34;http://en.wikipedia.org/wiki/Amazon_Web_Services&#34;&gt;Amazon Web Services&lt;/a&gt; for some months now, and I must say I&amp;rsquo;m pretty impressed by the overall quality. Compared to the other &amp;ldquo;clouds&amp;rdquo; I&amp;rsquo;ve played with, it&amp;rsquo;s the most mature and comprehensive by far.&lt;/p&gt;&#xA;&lt;p&gt;While writing a couple of tools to make my life easier, there&amp;rsquo;s one piece that took me longer: filtering the output of the &lt;code&gt;aws ec2 describe-instances&lt;/code&gt; command. The output is in &lt;a href=&#34;http://en.wikipedia.org/wiki/JSON&#34;&gt;JSON&lt;/a&gt;, which is quite nice you might say, and it is, but when it comes to interact with &lt;em&gt;JSON&lt;/em&gt; in the command line, things can get a little messy.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
