<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ben Schaechter</title>
    <description>The latest articles on DEV Community by Ben Schaechter (@bensign).</description>
    <link>https://dev.to/bensign</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F501959%2F3bbbd39e-cd46-46fe-b1a2-dbe0eaabbc92.jpg</url>
      <title>DEV Community: Ben Schaechter</title>
      <link>https://dev.to/bensign</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bensign"/>
    <language>en</language>
    <item>
      <title>Tracking Infrastructure Costs for Startups</title>
      <dc:creator>Ben Schaechter</dc:creator>
      <pubDate>Fri, 18 Jun 2021 16:35:09 +0000</pubDate>
      <link>https://dev.to/bensign/tracking-infrastructure-costs-for-startups-pi1</link>
      <guid>https://dev.to/bensign/tracking-infrastructure-costs-for-startups-pi1</guid>
      <description>&lt;p&gt;As cloud infrastructure service offerings have grown from a small set of services like virtual machines, object storage and networking primitives to an à la carte menu of hundreds of services, maintaining visibility into what services you're using and paying for can be a job in and of itself. As a startup you are rightfully focused on finding product market fit. However very soon after you achieve product market fit, margins start to become important. The sooner you start tending to cloud costs the easier it will be to get under control when the time comes. This post is meant to give a quick overview of how to think about cloud costs when you're just getting up and running as a startup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost Metrics Should be a Company KPI
&lt;/h2&gt;

&lt;p&gt;As you're navigating to finding product market fit you're typically tracking metrics that are customer focused. Depending on the nature of the company, you may be looking at the number of new user registrations, active user engagement metrics or revenue being generated. Typically, companies will also take a look at technical KPIs like performance of the application and the number of bugs/exceptions that are being raised.&lt;/p&gt;

&lt;p&gt;However, one often-forgotten metric that startups fail to track is cloud costs. This is primarily because usage-based infrastructure providers make this information particularly hard to find and track. Startups are usually granted credits from providers like AWS, GCP, Azure and DigitalOcean and forget about them until they expire and are suddenly faced with frantically unpacking their surprise bill. By tracking cost metrics from day 1, you can avoid these scenarios and always know how your infrastructure spend is trending.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start Using Cost Allocation Tags Early
&lt;/h2&gt;

&lt;p&gt;Instituting certain early behaviors in your organization can save you a lot of time and effort down the line and probably the easiest one to do is leveraging cost allocation tags. Using tags allows you to group infrastructure together by function (i.e. front-end vs back-end), environment (i.e. staging vs production) or even developer (i.e. Molly vs Brian) on your team. By applying tags to your infrastructure, you can see not only how much your infrastructure is trending in aggregate but also see how it is trending by each tag you apply.&lt;/p&gt;

&lt;p&gt;Cost Allocation Tags cost nothing and are usually pretty easy to apply. In the same way you think about writing unit tests, you should consider applying cost allocation tags as a general best-practice behavior. Just like with unit test, the earlier you get started with cost allocation tags the easier it becomes to manage over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implement Infrastructure Guardrails
&lt;/h2&gt;

&lt;p&gt;Infrastructure providers typically make it incredibly easy for you to provision resources: you can create some new virtual machines in a few clicks on consoles, create backups for storage volumes with the flip of a switch and easily push new files to an object storage as often as you'd like. What we've found from looking at aggregated, anonymized data is that the vast majority of customers have not put into place very basic guardrails that could keep costs in check - mostly from just not knowing these exist.&lt;/p&gt;

&lt;p&gt;Some easy guardrail examples to implement include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implementing lifecycle policies on ECR repos to prevent a backlog of unused legacy images.&lt;/li&gt;
&lt;li&gt;Using intelligent tiering on S3 Buckets to pay less money for assets which are no longer accessed.&lt;/li&gt;
&lt;li&gt;Purchasing Savings Plans and Reserved Instances for instances you know will be used consistently.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These guardrails typically take very little time for customers to enable but most people don't think about them. They also can have major consequences for saving money that adds up every single month.&lt;/p&gt;

&lt;h2&gt;
  
  
  Outsource your cost monitoring
&lt;/h2&gt;

&lt;p&gt;When you're a startup, your focus should be on your business. Spending time having to learn AWS cost APIs and getting them implemented in the manner you want can easily be an entire engineer's time. As your startup grows to have finance and management counterparts who are curious about costs and accounting for them properly, the asks become bespoke and it takes significant engineering time to get cost data organized and delivered to them that's better spent being outsourced.&lt;/p&gt;

&lt;p&gt;In the same way you look to third parties like Sentry for exception handling rather than rolling your own, sourcing cost monitoring solutions is likely your best bet. &lt;a href="https://vantage.sh/"&gt;Vantage&lt;/a&gt; offers a free tier to all startups with less than $2,500 per month in cloud infrastructure costs. You can get up and running in a few minutes and invite team-members to your Vantage account to share reports with others — which is a lot better than getting them on the AWS Console itself.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>startup</category>
    </item>
    <item>
      <title>A Simple AWS Pricing Ruby Client</title>
      <dc:creator>Ben Schaechter</dc:creator>
      <pubDate>Tue, 04 May 2021 16:27:36 +0000</pubDate>
      <link>https://dev.to/bensign/a-simple-aws-pricing-ruby-client-1dkg</link>
      <guid>https://dev.to/bensign/a-simple-aws-pricing-ruby-client-1dkg</guid>
      <description>&lt;p&gt;AWS pricing ranks high on the list of complicated topics that developers need to invest time in understanding. Depending on the service, pricing can be done on multiple dimensions that oftentimes results in having to unpack complicated AWS bills on a monthly basis. &lt;/p&gt;

&lt;p&gt;One website that has gained popularity over the years is &lt;a href="http://ec2instances.info/"&gt;ec2instances.info&lt;/a&gt; for how it simplifies down the user-experience around EC2 pricing. The data behind this website has just been made available through the recent launch of the &lt;a href="http://vantage.readme.io/"&gt;Vantage API&lt;/a&gt; and available as an official &lt;a href="https://github.com/vantage-sh/vantage-ruby"&gt;Ruby client library&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The API is completely free to use and makes getting EC2 instance product and pricing details pretty easy. A few examples are below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting EC2 Product Details:
&lt;/h2&gt;

&lt;p&gt;Getting EC2 instance product information is one of the most used functions of the API. Here's an example of how to get product information for a c5.xlarge EC2 instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;
&lt;span class="c1"&gt;# Load the gem&lt;/span&gt;
&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'vantage-client'&lt;/span&gt;

&lt;span class="c1"&gt;# Configure Vantage with your API token. Replace "YOUR_API_TOKEN" with the token you generate. &lt;/span&gt;
&lt;span class="no"&gt;Vantage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
  &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;access_token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'YOUR_API_TOKEN'&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="c1"&gt;# The Vantage::PricesApi class helps get simple information &lt;/span&gt;
&lt;span class="n"&gt;vantage_client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Vantage&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;PricesApi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;

&lt;span class="c1"&gt;# Find all instances with the instance type name of 'c5.xlarge'&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vantage_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_products&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;name: &lt;/span&gt;&lt;span class="s1"&gt;'c5.xlarge'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# See the entire response&lt;/span&gt;
&lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;products&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;first&lt;/span&gt;
&lt;span class="c1"&gt;# { &lt;/span&gt;
&lt;span class="c1"&gt;#   :id=&amp;gt;"aws-ec2-c5_xlarge", &lt;/span&gt;
&lt;span class="c1"&gt;#   :category=&amp;gt;"compute", &lt;/span&gt;
&lt;span class="c1"&gt;#   :name=&amp;gt;"c5.xlarge", &lt;/span&gt;
&lt;span class="c1"&gt;#   :service_id=&amp;gt;"aws-ec2", &lt;/span&gt;
&lt;span class="c1"&gt;#   :provider_id=&amp;gt;"aws", &lt;/span&gt;
&lt;span class="c1"&gt;#   :details=&amp;gt;{&lt;/span&gt;
&lt;span class="c1"&gt;#     :gpu=&amp;gt;0, &lt;/span&gt;
&lt;span class="c1"&gt;#     :name=&amp;gt;"C5 High-CPU Extra Large", &lt;/span&gt;
&lt;span class="c1"&gt;#     :vcpu=&amp;gt;4, &lt;/span&gt;
&lt;span class="c1"&gt;#     :memory=&amp;gt;8.0, &lt;/span&gt;
&lt;span class="c1"&gt;#     :storage=&amp;gt;nil, &lt;/span&gt;
&lt;span class="c1"&gt;#     :clock_speed_ghz=&amp;gt;3.0, &lt;/span&gt;
&lt;span class="c1"&gt;#     :physical_processor_description=&amp;gt;"Intel Xeon Platinum 8124M", &lt;/span&gt;
&lt;span class="c1"&gt;#     :network_performance_description=&amp;gt;"Up to 10 Gigabit"&lt;/span&gt;
&lt;span class="c1"&gt;#   }&lt;/span&gt;
&lt;span class="c1"&gt;# }&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Getting EC2 Instance Pricing
&lt;/h2&gt;

&lt;p&gt;Getting the price of an EC2 instance is also easy to do. Here's an example of how to get the price for a c5.xlarge. You'll need the product ID from the prior call to retrive prices. Note that Vantage will return all prices across all regions, platforms and lifecycle so client-side you'll want to filter for the appropriate region, platform and lifecycle.&lt;/p&gt;

&lt;p&gt;The price returned in the example below will give you the &lt;strong&gt;on-demand&lt;/strong&gt; price for a &lt;strong&gt;linux&lt;/strong&gt; EC2 instance in &lt;strong&gt;us-east-1&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;
&lt;span class="c1"&gt;# Load the gem&lt;/span&gt;
&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'vantage-client'&lt;/span&gt;

&lt;span class="c1"&gt;# Configure Vantage with your API token.  Replace "YOUR_API_TOKEN" with the token you generate. &lt;/span&gt;
&lt;span class="no"&gt;Vantage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
  &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;access_token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'YOUR_API_TOKEN'&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="c1"&gt;# The Vantage::PricesApi class helps get simple information &lt;/span&gt;
&lt;span class="n"&gt;vantage_client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Vantage&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;PricesApi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;

&lt;span class="c1"&gt;# Find all prices using the product ID returned in the previous example&lt;/span&gt;
&lt;span class="c1"&gt;# Note that this will return all prices across all regions and platform types by default.&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vantage_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_prices&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'aws-ec2-c5_xlarge'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;prices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;first&lt;/span&gt;
&lt;span class="c1"&gt;# {&lt;/span&gt;
&lt;span class="c1"&gt;#   :id=&amp;gt;"aws-ec2-c5_xlarge-us_east_1-on_demand-linux", &lt;/span&gt;
&lt;span class="c1"&gt;#   :unit=&amp;gt;"hour", &lt;/span&gt;
&lt;span class="c1"&gt;#   :region=&amp;gt;"us-east-1", &lt;/span&gt;
&lt;span class="c1"&gt;#   :rate_type=&amp;gt;"compute", &lt;/span&gt;
&lt;span class="c1"&gt;#   :currency=&amp;gt;"USD", &lt;/span&gt;
&lt;span class="c1"&gt;#   :amount=&amp;gt;0.17, &lt;/span&gt;
&lt;span class="c1"&gt;#   :details=&amp;gt;{&lt;/span&gt;
&lt;span class="c1"&gt;#     :platform=&amp;gt;"linux", &lt;/span&gt;
&lt;span class="c1"&gt;#     :lifecycle=&amp;gt;"on-demand"&lt;/span&gt;
&lt;span class="c1"&gt;#   }&lt;/span&gt;
&lt;span class="c1"&gt;# }&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Hopefully this post gives you a quick overview of some of the things you can do through the Vantage API with their official Ruby client. It's all completely free so give it a try yourself: &lt;a href="https://github.com/vantage-sh/vantage-ruby"&gt;https://github.com/vantage-sh/vantage-ruby&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>ruby</category>
      <category>ec2</category>
    </item>
    <item>
      <title>Vantage: An Alternative AWS Console</title>
      <dc:creator>Ben Schaechter</dc:creator>
      <pubDate>Wed, 09 Dec 2020 19:20:52 +0000</pubDate>
      <link>https://dev.to/bensign/vantage-an-alternative-aws-console-48m5</link>
      <guid>https://dev.to/bensign/vantage-an-alternative-aws-console-48m5</guid>
      <description>&lt;p&gt;There are two things that tend to ring true with AWS customers: The AWS web console has a rough developer experience and it is difficult to understand where costs are coming from. If these two things resonate with you, you may consider checking out &lt;a href="http://vantage.sh/"&gt;http://vantage.sh/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Vantage is an alternative to the AWS Console that provides a clean user experience and an emphasis on where your costs are coming from. Think of it like Mint.com for your AWS account.  When you link your AWS account it will look across all AWS regions and all AWS services and provide you with information.&lt;/p&gt;

&lt;p&gt;The best part is that Vantage will stay in sync with your AWS account. This allows you to continue using infrastructure as code or the CLI to spin up resources then use Vantage to cross check that everything is appropriately provisioned and correct from a price perspective. &lt;/p&gt;

&lt;p&gt;Give it a try and let me know what you think in the comments. &lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
