<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>The blog</title>
    <description>This is the blog
</description>
    <link>https://gautamk.com/</link>
    <atom:link href="https://gautamk.com/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Thu, 08 Jan 2015 14:08:31 +0000</pubDate>
    <lastBuildDate>Thu, 08 Jan 2015 14:08:31 +0000</lastBuildDate>
    <generator>Jekyll v2.4.0</generator>
    
      <item>
        <title>Restrict s3 access to an ec2 instance</title>
        <description>&lt;p&gt;I’ve been rambling since yesterday trying to find an elegant way to restrict access s3 access to an ec2 instance. I wish it was more obvious. &lt;/p&gt;

&lt;p&gt;So anyway the trick is to assign an elastic ip to your ec2 instance and apply the following bucket policy &lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-json&quot; data-lang=&quot;json&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;quot;Statement&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;quot;Action&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&amp;quot;s3:GetObject&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;quot;Effect&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Allow&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;quot;Resource&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;arn:aws:s3:::&amp;lt;bucket_name&amp;gt;/path/*&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;quot;Condition&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;quot;StringEquals&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;quot;aws:SourceIp&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;lt;elastic_ip&amp;gt;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;quot;Principal&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;quot;AWS&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
          &lt;span class=&quot;s2&quot;&gt;&amp;quot;*&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;so now we can do &lt;code&gt;wget 	https://s3.amazonaws.com/bucket-name/path/filename&lt;/code&gt; and it will work.&lt;/p&gt;
</description>
        <pubDate>Thu, 08 Jan 2015 00:00:00 +0000</pubDate>
        <link>https://gautamk.com/dev-log/2015/01/08/restrict-s3-access-to-an-ec2-instance.html</link>
        <guid isPermaLink="true">https://gautamk.com/dev-log/2015/01/08/restrict-s3-access-to-an-ec2-instance.html</guid>
        
        <category>aws</category>
        
        <category>security</category>
        
        
        <category>dev-log</category>
        
      </item>
    
      <item>
        <title>/dev/log Jan 5th 2015 DNS security</title>
        <description>&lt;p&gt;I learned a lot about dns and how dns poisoning attacks work. DNS was first built in the 80s and like The Internet protocol suite and UNIX before it, It is super awesome ! As the article below rightfully suggests its a distributed Key-value store before it was cool.&lt;/p&gt;

&lt;p&gt;Here’s a well &lt;a href=&quot;https://blog.cloudflare.com/dnssec-an-introduction/&quot;&gt;written article&lt;/a&gt; from cloudflare explaining how DNSSEC and dns attacks work.&lt;/p&gt;
</description>
        <pubDate>Tue, 06 Jan 2015 07:41:44 +0000</pubDate>
        <link>https://gautamk.com/dev-log/2015/01/06/devlog-jan-5th-2014-dns-security.html</link>
        <guid isPermaLink="true">https://gautamk.com/dev-log/2015/01/06/devlog-jan-5th-2014-dns-security.html</guid>
        
        <category>dns</category>
        
        
        <category>dev-log</category>
        
      </item>
    
      <item>
        <title>/dev/log Jan 4th 2015</title>
        <description>&lt;p&gt;Downloading llvm, I’m following the &lt;a href=&quot;http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary&quot;&gt;getting started&lt;/a&gt; guide. Dammit they’re still stuck with subversion. In one way its a good thing, I don’t have to wait ages for the repo to download on a slow connection. &lt;/p&gt;

&lt;p&gt;llvm + clang takes ages to compile I probably need something faster than my i3 8gig machine.&lt;/p&gt;
</description>
        <pubDate>Sun, 04 Jan 2015 07:30:57 +0000</pubDate>
        <link>https://gautamk.com/dev-log/2015/01/04/devlog-jan-4th-2015.html</link>
        <guid isPermaLink="true">https://gautamk.com/dev-log/2015/01/04/devlog-jan-4th-2015.html</guid>
        
        <category>llvm</category>
        
        
        <category>dev-log</category>
        
      </item>
    
      <item>
        <title>No more rambling, complaining or cynicism</title>
        <description>&lt;p&gt;As the title says I will not be writing anymore confused, irritated posts infused with cynicism. &lt;/p&gt;

&lt;p&gt;On the technical side, comments on this blog are now optional i.e I can optionally enable comments for certain posts that I deem comment worthy.&lt;/p&gt;

</description>
        <pubDate>Sat, 03 Jan 2015 08:49:39 +0000</pubDate>
        <link>https://gautamk.com/blog/2015/01/03/no-more-rambling-complaining-or-cynicism.html</link>
        <guid isPermaLink="true">https://gautamk.com/blog/2015/01/03/no-more-rambling-complaining-or-cynicism.html</guid>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>This year&#39;s first day in office</title>
        <description>&lt;p&gt;Well the first day in office for the year. Nothing particularly interesting. I need to stay up more at night and work. The drive home is kinda getting to me. Too tired to work especially after dinner so I end up falling asleep. Need to stay awake more. Anyway its a friday so no office tomorrow YAY ! Nope, I’ve got work to do. &lt;/p&gt;
</description>
        <pubDate>Fri, 02 Jan 2015 18:56:41 +0000</pubDate>
        <link>https://gautamk.com/blog/2015/01/02/this-years-first-day-in-office.html</link>
        <guid isPermaLink="true">https://gautamk.com/blog/2015/01/02/this-years-first-day-in-office.html</guid>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>A New Year Yay! Nope !</title>
        <description>&lt;p&gt;Well its 2015, a year that begins on a thursday. I wake up to 500+ messages on whatsapp. Thats right I slept through the birth of the new year. So what ? &lt;/p&gt;

&lt;p&gt;The day began as usual until the emergency, lets just say I had to visit the hospital, thankfully not for myself. Here is a lesson for the new year stay safe on days surrounding holidays because doctors aren’t easy to find because they have families too. &lt;/p&gt;
</description>
        <pubDate>Thu, 01 Jan 2015 08:32:28 +0000</pubDate>
        <link>https://gautamk.com/blog/2015/01/01/a-new-year-yay-nope-.html</link>
        <guid isPermaLink="true">https://gautamk.com/blog/2015/01/01/a-new-year-yay-nope-.html</guid>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>New year ? Its just another day</title>
        <description>&lt;h2 id=&quot;too-many-expectations&quot;&gt;Too many expectations&lt;/h2&gt;

&lt;p&gt;New Year huh ? A lot is expected of tomorrow. New year resolutions, Things are going to be better, Optimism, wishes blah blah. Don’t get me wrong, I’m not a pessimist, neither am I an optimist. I just don’t need another day to postpone things to. I’ll start becoming better on Thursday, on Jan 1st. When was the last time new year resolutions worked ? &lt;/p&gt;

&lt;h2 id=&quot;why-a-holiday-&quot;&gt;Why a holiday ?&lt;/h2&gt;

&lt;p&gt;Why is the first day of the year even a holiday ? If you expect the year to get better then its best to start now. &lt;/p&gt;

&lt;h2 id=&quot;you-know-what-im-stopping-right-now-im-going-to-go-work-&quot;&gt;You know what I’m stopping right now. I’m going to go work !&lt;/h2&gt;
</description>
        <pubDate>Wed, 31 Dec 2014 08:48:28 +0000</pubDate>
        <link>https://gautamk.com/blog/2014/12/31/new-year--just-another-day.html</link>
        <guid isPermaLink="true">https://gautamk.com/blog/2014/12/31/new-year--just-another-day.html</guid>
        
        <category>new-year</category>
        
        <category>2015</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Hello World!</title>
        <description>&lt;p&gt;So this is the first post eh ? Well here goes.&lt;/p&gt;

&lt;p&gt;I’ve just managed to setup my domain with a blog hosted using github pages.
The source code can be found at &lt;a href=&quot;https://github.com/gautamk/gautamk.github.io&quot;&gt;gautamk/gautamk.github.io&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Tue, 30 Dec 2014 08:33:28 +0000</pubDate>
        <link>https://gautamk.com/blog/2014/12/30/hello-world.html</link>
        <guid isPermaLink="true">https://gautamk.com/blog/2014/12/30/hello-world.html</guid>
        
        
        <category>blog</category>
        
      </item>
    
  </channel>
</rss>
