<?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: Anders Bjoernestad</title>
    <description>The latest articles on DEV Community by Anders Bjoernestad (@abjoerne).</description>
    <link>https://dev.to/abjoerne</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%2F576370%2F24ac3828-a079-451e-ac8a-2f3b09dbe187.jpeg</url>
      <title>DEV Community: Anders Bjoernestad</title>
      <link>https://dev.to/abjoerne</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abjoerne"/>
    <language>en</language>
    <item>
      <title>AWS price and cost — analysing and monitoring</title>
      <dc:creator>Anders Bjoernestad</dc:creator>
      <pubDate>Mon, 07 Apr 2025 11:36:12 +0000</pubDate>
      <link>https://dev.to/abjoerne/aws-price-and-cost-analysing-and-monitoring-67j</link>
      <guid>https://dev.to/abjoerne/aws-price-and-cost-analysing-and-monitoring-67j</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="https://abjoerne.medium.com/aws-price-and-cost-multi-account-setup-754966723049" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afill%3A88%3A88%2F1%2AbZOzhp2jWoPGWft-OYTmdg.jpeg" alt="Anders Bjørnestad"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://abjoerne.medium.com/aws-price-and-cost-multi-account-setup-754966723049" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;AWS price and cost — multi account setup | by Anders Bjørnestad | Medium&lt;/h2&gt;
      &lt;h3&gt;Anders Bjørnestad ・ &lt;time&gt;Oct 3, 2022&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fmedium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        abjoerne.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>aws</category>
      <category>cloud</category>
      <category>monitoring</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Manage your custom Billing Views as code</title>
      <dc:creator>Anders Bjoernestad</dc:creator>
      <pubDate>Mon, 07 Apr 2025 10:44:25 +0000</pubDate>
      <link>https://dev.to/aws-heroes/manage-your-custom-billing-views-as-code-48b9</link>
      <guid>https://dev.to/aws-heroes/manage-your-custom-billing-views-as-code-48b9</guid>
      <description>&lt;p&gt;The &lt;em&gt;custom billing view&lt;/em&gt; was &lt;a href="https://aws.amazon.com/blogs/aws-cloud-financial-management/introducing-custom-billing-views-tailored-cost-and-usage-view-relevant-for-your-stakeholders/" rel="noopener noreferrer"&gt;introduced by AWS back in December 2024&lt;/a&gt;, but still a lot of customers have not discovered it. Make sure to take a look if this is new to you and your teams care about the AWS bill.&lt;/p&gt;

&lt;h1&gt;
  
  
  Background
&lt;/h1&gt;

&lt;p&gt;Earlier the billing view in AWS was only visible for two different areas, single account view and organizational view (all accounts in an AWS organization). That goes for both the dashoboard as well as the cost explorer. You could filter on accounts in the cost explorer, but that required access to the management account.&lt;/p&gt;

&lt;h1&gt;
  
  
  Custom billing views are here
&lt;/h1&gt;

&lt;p&gt;This new feature let us create and share separate views for different purposes. This is a very noce feature in an environment where you for example have different accounts for different teams and environments.&lt;/p&gt;

&lt;p&gt;A custom billing view contain a dashboard and cost-explorer with access to what you define for that view. You can create views (in the management account) which are either account-based or cost-tag-based filters, and they look like this (with a selector in the upper left corner). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp6uvid1o9z9x272ri2cl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp6uvid1o9z9x272ri2cl.png" alt="Image description" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating a view you can share it with one or more AWS accounts within your organization. This sharing is done with RAM (Resource Access Manager) &lt;/p&gt;

&lt;h1&gt;
  
  
  Managing billing views with CLI
&lt;/h1&gt;

&lt;p&gt;Because we do not want to do click-ops, we need a way to automate this. Here we can use the AWS CLI.&lt;/p&gt;

&lt;p&gt;Let us have some variables to make things easier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;$teamName = name of team&lt;/li&gt;
&lt;li&gt;$teamAccounts = account(s) where the team view their billingdata (example &lt;code&gt;"123456789012 123456789999"&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;$dataFilter = list of accounts to include in the report, for example dev, stage and prod accounts. The &lt;code&gt;dataFilter&lt;/code&gt; must be on the following format
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "dimensions": {
    "key": "LINKED_ACCOUNT",
    "values": [
      "123456789012",
      "210987654321",
      "121314151616"
    ]
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create a view
&lt;/h3&gt;

&lt;p&gt;Here we create a view and keep the ARN in a variable for later use&lt;/p&gt;

&lt;p&gt;&lt;code&gt;billingviewARN=$(aws billing create-billing-view  --name '$teamName' --source-views arn:aws:billing::123456789012:billingview/primary  --data-filter-expression $dataFilter --query arn)&lt;/code&gt;&lt;br&gt;
Note that a billing-view need a "parent" view, which has to be &lt;code&gt;primary&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A billing-view can also be tagged, and the tag can be &lt;a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbilling.html#awsbilling-actions-as-permissions" rel="noopener noreferrer"&gt;used in a policy&lt;/a&gt; if you like to restrict access to a view. &lt;/p&gt;

&lt;h3&gt;
  
  
  Share the view with one or more accounts
&lt;/h3&gt;

&lt;p&gt;For sharing the billing-view with one or more accounts, a persmisson policy is required - for billingview you use &lt;br&gt;
&lt;code&gt;arn:aws:ram::aws:permission/AWSRAMDefaultPermissionBillingView&lt;/code&gt;&lt;br&gt;
If you like to alter the permissions yourself you can also make your own policy in RAM. &lt;/p&gt;

&lt;p&gt;Sharing is done like this:&lt;br&gt;
&lt;code&gt;aws --region us-east-1 ram create-resource-share --name "$teamName" --resource-arns $billingviewARN --principals $teamAccounts --permission-arns arn:aws:ram::aws:permission/AWSRAMDefaultPermissionBillingView --no-allow-external-principals&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To avoid shareing with external account I use &lt;code&gt;no-allow-external-principals&lt;/code&gt;. This specifies that principals outside your organization can not be associated with this resource share. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IMPORTANT&lt;/strong&gt; Everything related to billing is in &lt;code&gt;us-east-1&lt;/code&gt; so make sure you use the CLI with the correct region when using RAM&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;You should now be able to automate the creation and sharing of custom billing views in your AWS organization. This is much more scalable if you have multiple teams, and you add a script to the on-baording-process. Let the cost be visible to different teams so each team can be better equiped to keep the cost down. &lt;/p&gt;

&lt;p&gt;References:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS CLI billing &lt;a href="https://awscli.amazonaws.com/v2/documentation/api/latest/reference/billing/index.html#cli-aws-billing" rel="noopener noreferrer"&gt;https://awscli.amazonaws.com/v2/documentation/api/latest/reference/billing/index.html#cli-aws-billing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;AWS CLI RAM &lt;a href="https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ram/index.html#cli-aws-ram" rel="noopener noreferrer"&gt;https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ram/index.html#cli-aws-ram&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>finops</category>
      <category>devops</category>
    </item>
    <item>
      <title>AWS price and cost — billing</title>
      <dc:creator>Anders Bjoernestad</dc:creator>
      <pubDate>Mon, 19 Sep 2022 12:30:08 +0000</pubDate>
      <link>https://dev.to/aws-heroes/aws-price-and-cost-billing-29ek</link>
      <guid>https://dev.to/aws-heroes/aws-price-and-cost-billing-29ek</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="https://abjoerne.medium.com/aws-price-and-cost-billing-35b0954a2aff" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--71RCkwY1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/fit/c/96/96/1%2AbZOzhp2jWoPGWft-OYTmdg.jpeg" alt="Anders Bjørnestad"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://abjoerne.medium.com/aws-price-and-cost-billing-35b0954a2aff" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;AWS price and cost — billing. (This is part 2 of a series of blog… | by Anders Bjørnestad | Sep, 2022 | Medium&lt;/h2&gt;
      &lt;h3&gt;Anders Bjørnestad ・ &lt;time&gt;Sep 19, 2022&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnDHPsJs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        abjoerne.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>aws</category>
    </item>
    <item>
      <title>AWS price and cost — introduction</title>
      <dc:creator>Anders Bjoernestad</dc:creator>
      <pubDate>Fri, 16 Sep 2022 06:20:21 +0000</pubDate>
      <link>https://dev.to/aws-heroes/aws-price-and-cost-introduction-p2h</link>
      <guid>https://dev.to/aws-heroes/aws-price-and-cost-introduction-p2h</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="https://abjoerne.medium.com/aws-price-and-cost-introduction-73b7957e8321" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N2OUPWwE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/fit/c/48/48/1%2AbZOzhp2jWoPGWft-OYTmdg.jpeg" alt="Anders Bjørnestad"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://abjoerne.medium.com/aws-price-and-cost-introduction-73b7957e8321" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;AWS price and cost — introduction | by Anders Bjørnestad | Sep, 2022 | Medium&lt;/h2&gt;
      &lt;h3&gt;Anders Bjørnestad ・ &lt;time&gt;Sep 16, 2022&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnDHPsJs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        abjoerne.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Let’s confirm you are human</title>
      <dc:creator>Anders Bjoernestad</dc:creator>
      <pubDate>Thu, 27 Jan 2022 11:41:13 +0000</pubDate>
      <link>https://dev.to/aws-heroes/lets-confirm-you-are-human-1fef</link>
      <guid>https://dev.to/aws-heroes/lets-confirm-you-are-human-1fef</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="https://abjoerne.medium.com/lets-confirm-you-are-human-5c3341012187" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d20bARc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/fit/c/56/56/1%2AbZOzhp2jWoPGWft-OYTmdg.jpeg" alt="Anders Bjørnestad"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://abjoerne.medium.com/lets-confirm-you-are-human-5c3341012187" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Let’s confirm you are human. AWS WAF now have support for Captcha | by Anders Bjørnestad | Jan, 2022 | Medium&lt;/h2&gt;
      &lt;h3&gt;Anders Bjørnestad ・ &lt;time&gt;Jan 27, 2022&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnDHPsJs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        abjoerne.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>aws</category>
      <category>captcha</category>
    </item>
    <item>
      <title>Are you relying on automated upgrades of your SQLServer in AWS?</title>
      <dc:creator>Anders Bjoernestad</dc:creator>
      <pubDate>Fri, 21 May 2021 11:36:55 +0000</pubDate>
      <link>https://dev.to/aws-heroes/are-you-relying-on-automated-upgrades-of-your-sqlserver-in-aws-1m3l</link>
      <guid>https://dev.to/aws-heroes/are-you-relying-on-automated-upgrades-of-your-sqlserver-in-aws-1m3l</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="https://abjoerne.medium.com/are-you-relying-on-automated-upgrades-of-your-sqlserver-in-aws-4a355532f10b" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afill%3A88%3A88%2F1%2AbZOzhp2jWoPGWft-OYTmdg.jpeg" alt="Anders Bjørnestad"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://abjoerne.medium.com/are-you-relying-on-automated-upgrades-of-your-sqlserver-in-aws-4a355532f10b" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Are you relying on automated upgrades of your SQLServer in AWS? | by Anders Bjørnestad | Webstep | Medium&lt;/h2&gt;
      &lt;h3&gt;Anders Bjørnestad ・ &lt;time&gt;Jun 14, 2022&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fmedium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        abjoerne.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Save AWS-cost on CloudFront</title>
      <dc:creator>Anders Bjoernestad</dc:creator>
      <pubDate>Tue, 09 Feb 2021 11:57:19 +0000</pubDate>
      <link>https://dev.to/aws-heroes/save-aws-cost-on-cloudfront-3j25</link>
      <guid>https://dev.to/aws-heroes/save-aws-cost-on-cloudfront-3j25</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="https://abjoerne.medium.com/save-aws-cost-on-cloudfront-dd87e105856e" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d20bARc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/fit/c/56/56/1%2AbZOzhp2jWoPGWft-OYTmdg.jpeg" alt="Anders Bjørnestad"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://abjoerne.medium.com/save-aws-cost-on-cloudfront-dd87e105856e" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Save AWS-cost on CloudFront. AWS have again announced a form of… | by Anders Bjørnestad | Feb, 2021 | Medium&lt;/h2&gt;
      &lt;h3&gt;Anders Bjørnestad ・ &lt;time&gt;Feb 9, 2021&lt;/time&gt; ・ 3 min read
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KBvj_QRD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/medium_icon-90d5232a5da2369849f285fa499c8005e750a788fdbf34f5844d5f2201aae736.svg" alt="Medium Logo"&gt;
        abjoerne.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
 

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