<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Save Cost on Technology Enlightened</title>
    <link>https://pprakash.me/tags/save-cost/</link>
    <description>Recent content in Save Cost on Technology Enlightened</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>&amp;copy; &lt;a href=&#34;https://github.com/p-prakash/&#34;&gt;Prakash P&lt;/a&gt; 2015 - 2023</copyright>
    <lastBuildDate>Sun, 15 Nov 2015 14:56:57 +0000</lastBuildDate>
    <atom:link href="https://pprakash.me/tags/save-cost/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Save AWS costs by scheduled start and stop of EC2 instances</title>
      <link>https://pprakash.me/tech/2015/11/15/save-aws-costs-by-scheduled-start-and-stop-of-ec2-instances/</link>
      <pubDate>Sun, 15 Nov 2015 14:56:57 +0000</pubDate>
      <guid>https://pprakash.me/tech/2015/11/15/save-aws-costs-by-scheduled-start-and-stop-of-ec2-instances/</guid>
      <description>&lt;p&gt;Most of the AWS resources are billed on per-hour basis which provides us an opportunity to save cost based on the usage pattern. Especially in case of Dev/Test environment, we need them only during the working days and working hours.&lt;/p&gt;&#xA;&lt;p&gt;By using &lt;a href=&#34;https://aws.amazon.com/lambda/&#34;&gt;AWS Lambda&lt;/a&gt; function (&lt;a href=&#34;https://aws.amazon.com/blogs/aws/aws-lambda-update-python-vpc-increased-function-duration-scheduling-and-more/&#34;&gt;python&lt;/a&gt;) in combination with EC2 instance tags, scheduled start or stop can be achieved with few lines of code.&lt;/p&gt;&#xA;&lt;p&gt;Advantages of using AWS Lambda:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;For 128MB memory we get 3,200,000 seconds &lt;a href=&#34;https://aws.amazon.com/lambda/pricing/&#34;&gt;free tier usage per month in AWS Lambda&lt;/a&gt; which will be more than enough for this function.&lt;/li&gt;&#xA;&lt;li&gt;IAM role will be associated with the Lambda function which will be used to perform the required task and no separate keys need to be configured.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I used a tag with name as &lt;em&gt;schedule&lt;/em&gt; &amp;amp; JSON string for tag value using which I could define the day and time when it needs to be started or stopped.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
