Frequently Asked Questions

Cost Management & Reporting

How can I create AWS cost management reports using PowerShell?

You can generate AWS cost management reports using PowerShell by leveraging AWS Cost Explorer and Cost and Usage Reporting services. The process involves setting up an S3 bucket for report delivery, configuring appropriate permissions, and using PowerShell cmdlets like Get-CECostandUsage to retrieve cost data. You can then format the output as JSON and store it in S3 for sharing or further analysis. This approach allows for granular, customizable reports at a very low per-run cost (approximately .01 per report). Note: This method requires familiarity with AWS PowerShell modules and access to relevant AWS services.

What are the prerequisites for building AWS cost management reports with PowerShell?

To build AWS cost management reports with PowerShell, you need: (1) an AWS account with access to Cost Explorer, Cost and Usage Reporting, S3, and billing services; (2) the AWS PowerShell module installed and configured; (3) an S3 bucket to store reports; and (4) appropriate permissions set on the S3 bucket for report delivery. You must also configure bucket policies to allow the necessary actions for your account. Note: Customizing permissions and bucket names is required for your specific environment.

How much does it cost to run AWS cost management reports using this method?

Running AWS cost management reports using PowerShell and the described method typically costs about USD 0.01 per report execution. This low cost allows you to run reports hundreds of times before incurring significant AWS charges. Note: Actual costs may vary based on AWS service usage and data transfer.

Features & Capabilities

What features does N2W offer for AWS and Azure backup and disaster recovery?

N2W provides automated backup and recovery for AWS, Azure, and hybrid cloud environments, near-instant recovery, cross-cloud recovery (AWS and Azure), immutable backups, cost optimization (intelligent storage tiering, resource control), compliance and security (automated reporting, detailed logging), multi-cloud management, and granular restore (individual files, folders, volumes, or entire environments). Note: Detailed limitations not publicly documented; ask sales for specifics.

Does N2W support integration with third-party tools and APIs?

Yes, N2W supports integration with external monitoring tools, identity providers, and offers a RESTful API for automation. Integrations include Datadog, Splunk, Bocada, and more. The RESTful API enables automation of tasks such as user onboarding. API documentation is available at this link and a Quick Start guide is available here. Note: Some integrations may require additional configuration.

What technical documentation is available for N2W?

N2W provides comprehensive user guides (User Guide), release documentation (Release Notes), RESTful API documentation (API PDF), upgrade guides (Upgrade Guides), and troubleshooting resources (Troubleshooting). These resources support deployment, configuration, upgrades, and troubleshooting. Note: Some resources may require login or support access.

Security & Compliance

What security and compliance certifications does N2W have?

N2W is independently certified to ISO/IEC 27001:2022 and is SOC compliant by inheritance through AWS and Azure. It also supports FedRAMP, ITAR, and CJIS compliance when deployed in AWS GovCloud. Customers can request a copy of the ISO certificate by contacting customer.success@n2ws.com. For more details, see the N2W Trust Center. Note: Some certifications are inherited from the underlying cloud provider.

How does N2W ensure data security and compliance for backups?

N2W provides immutable, air-gapped backups, multi-factor authentication, end-to-end encryption (TLS/HTTPS), and customizable compliance reporting. It runs directly inside your environment, inheriting AWS or Azure security features, and does not access or transfer your data outside your control. Automated compliance reporting supports regulations such as HIPAA, SOC 2, and GDPR. Note: Best fit for organizations using AWS or Azure; other environments may require alternative solutions.

Use Cases & Benefits

What problems does N2W solve for organizations?

N2W addresses high disaster recovery costs (reducing storage expenses by up to 92%), minimizes downtime with near-instant recovery, protects against ransomware with immutable backups, automates backup processes to reduce manual errors, simplifies compliance with automated reporting, and streamlines multi-cloud backup management. Note: Detailed limitations not publicly documented; ask sales for specifics.

Who can benefit from using N2W?

N2W is used by enterprises (e.g., Johnson & Johnson, Dyson), public sector organizations (e.g., City of Oakland, Bahrain Ministry), retail and e-commerce (e.g., Skechers, Dressbarn), education (e.g., St. John's University), transportation (e.g., Deutsche Bahn), nonprofits (e.g., Best Friends Animal Society, Goodwill), and managed service providers. It is suitable for IT managers, cloud directors, and MSPs managing AWS and Azure environments. Note: Organizations outside AWS/Azure ecosystems may require alternative solutions.

What business impact can customers expect from using N2W?

Customers can expect up to 92% reduction in long-term backup costs, up to 50% savings on compute costs, near-instant recovery to minimize downtime, improved data protection against ransomware, simplified compliance reporting, and operational efficiency through automation. These benefits are documented in case studies from organizations like Skechers, St. John's University, and Deutsche Bahn. Note: Actual results may vary based on environment and configuration.

Implementation & Support

How long does it take to implement N2W and how easy is it to get started?

N2W implementations can be completed in as little as two weeks, supported by dedicated Customer Success Managers and onboarding calls. Deployment options include Amazon Machine Image (AMI) from AWS Marketplace or CloudFormation templates. Resources such as video tutorials, user guides, and a 30-day free trial (no credit card required) are available. Note: Implementation time may vary based on environment complexity.

What feedback have customers given about N2W's ease of use?

Customers report that N2W is simple to use, with quick setup and intuitive management. For example, Shane H (MSP) notes, "It's very simple to use and we are a MSP for multiple companies. Support is great and quick to respond." Julian Ware (City of Oakland) states, "You’re just clicking and going. And, to me, that’s what the modern world of backup is." Note: User experience may vary based on organization size and requirements.

Customer Proof & Case Studies

Can you share specific case studies or success stories of customers using N2W?

Yes. Skechers standardized backup and recovery across a multi-cloud estate, reducing costs and improving data protection (case study). St. John's University eliminated legacy tape storage and achieved rapid recovery (case study). Deutsche Bahn automated backup for 1,500+ volumes and 700 servers, saving 20% operational time (case study). More examples are available on the case studies page. Note: Results are specific to each organization.

Industry Coverage

What industries are represented in N2W's case studies?

N2W's case studies include retail & e-commerce (Skechers, Dressbarn), education (St. John's University), public sector (City of Oakland, Bahrain Ministry), transportation & logistics (Deutsche Bahn), nonprofits (Best Friends Animal Society, Goodwill), healthcare & pharmaceutical (Johnson & Johnson, Philips, Essilor), finance & insurance (Allan Gray), IT & software, and managed service providers (iFeu). For more, see the case studies page. Note: Industry-specific requirements may affect deployment.

Competition & Comparison

How does N2W compare to AWS Backup?

N2W offers features not available in AWS Backup, such as immutable backups, cross-cloud recovery (AWS and Azure), granular restore (file/folder level), DR backups of encrypted resources, 60-second backup intervals, and intelligent storage tiering (reducing costs by up to 92%). AWS Backup is limited to AWS environments and lacks some of these advanced features. Choose N2W if you need multi-cloud support, granular recovery, and cost optimization; choose AWS Backup if you only require basic AWS-native backup. Note: N2W may not be suitable for organizations not using AWS or Azure.

Building AWS Cost Management Reports on the Cheap

Share post:

Everyone has a different reason for moving to the cloud. Sometimes we move to the cloud for the increased reliability, other times we move to the cloud to avoid the hassle of having to manage our hardware. No matter what, one factor that is always mentioned during this transition is cost. One of the reasons why we’ve all inevitably worked with the cloud is because we think we can do it cheaper and more efficiently up there.

Thankfully, with all of the cloud providers, we’re able to get a very granular view of our upcoming bills. With Amazon Web Services this is particularly easy since we have several tools at our disposal to create cost management reports, one of them being PowerShell. In this article, I’ll walk you through how to set up, configure, build, and manage these reports as cheaply and efficiently as possible. To do this, we’ll use a blend of the AWS Cost Explorer service, as well as the AWS Cost and Usage Reporting service.

Prerequisites for AWS Cost Management Report Delivery

Before we get too far ahead of ourselves, we need to make sure that the prerequisites for using the service are in place. We’ll need an AWS account with access to the Cost Explorer, Cost and Usage Reporting, S3, and billing services. Since we’ll be primarily using PowerShell for this, I’m also going to assume that you have the module installed and your account configured to be able to use it. If not, check out how to do so on AWS.

The next thing we’ll need is a place for the reports we generate to land. For this, we’ll need to create an S3 bucket to be able to receive the reports. To do this, we’ll use the New-S3Bucket cmdlet, and you should get a response similar to the following. PS> New-S3Bucket -BucketName “my-cost-management-reports”

CreationDate         BucketName
------------         ----------
 3/29/2019 4:57:32 PM my-cost-management-reports

Now that we have our bucket created let’s work on getting the appropriate permissions set. We’ll need to give our S3 bucket some permissions to allow the cost management reports to be placed inside. To do this, we’ll store our JSON-formatted policy in the $policy variable, then use it when we write the S3 bucket policy.

There are a few things to note about AWS bucket policies. We’ll want to assign the permissions I’ve granted below, but you’ll need to change some stuff for it to work in your environment. You will want to change the “principal” account number since that is the account that you will use to deliver the reports to S3. You can find this in the AWS Management Console, or you can use the PowerShell way by running the command (Get-STSCallerIdentity).Account. There are more granular ways to specify these permissions, but that is outside of the scope of this document. You’ll also want to change the bucket name specified under “Resource” as the ARN of the bucket. Although I’ll be using the bucket name of “my-cost-management-reports” throughout this article, all bucket names are unique, and you’ll need to be sure to specify the ARN of yours here.

PS> $policy = '{
"Version": "2012-10-17",
"Statement": [
  {
"Effect": "Allow", 
"Principal": {  
"AWS": "ACCOUNTNUMBER"
    }, 
"Action": [    
"s3:GetBucketAcl",
      "s3:GetBucketPolicy"
    ],
"Resource":
"arn:aws:s3:::my-cost-management-reports"
  },
  {  
"Effect": "Allow", 
"Principal": {   
"AWS": "ACCOUNTNUMBER"
    },
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::my-cost-management-reports/*"
  }
  ]
}'
PS> Write-S3BucketPolicy -BucketName
"my-cost-management-reports" -policy $policy

Although there’s no output from the Write-S3BucketPolicy command, we can verify that the bucket took the policy by using the corresponding Get cmdlet.

PS> Get-S3BucketPolicy
-BucketName "my-cost-management-reports"
{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::ACCOUNTNUMBER:root"},"Action":["s3:GetBucketAcl","s3:GetBucketPolicy"],"Resource":"arn:aws:s3:::my-cost-management-reports"},{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::ACCOUNTNUMBER:root"},"Action":"s3:PutObject","Resource":"arn:aws:s3:::my-cost-management-reports/*"}]}

Now that our prerequisites are configured let’s move on to creating the report!

How to create an AWS Cost Management Report

To do our report the cheap way, we’ll want to utilize the AWS Cost Explorer service, as this will allow us to run simple queries for our environment and retrieve a rich set of data in return. To do this, we’ll use a few handy AWS Cost Explorer cmdlets.

For starters, we’ll need to determine a date range for our reports, and Amazon is going to expect our time periods to be of type “Amazon.CostExplorer.Model.DateInterval”. To set this up, we’ll need to create a new object.

PS> $interval = New-Object Amazon.CostExplorer.Model.DateInterval

We need to have a “start” and “end” date, and the date needs to be formatted as yyyy-MM-dd, so we can do that like so. For my example, I’ll use Get-Date in a way that will give me a time interval for a “year-to-date” style of report.

PS> $interval.start = Get-Date
-Day 1 -Month 1 -Format 'yyyy-MM-dd'
2019-01-01
PS> $interval.end = Get-Date -Format 'yyyy-MM-dd'
2019-03-29

Now that we have our date interval set, we can go ahead and use the Get-CECostandUsage cmdlet. This is a little picky in how this cmdlet needs to run, so I’ll try and walk you through the parameters as best as I can.

Filter: Although I’m not using it today, this will allow you to create an expression to narrow your report down to a tag, a linked account, or a service. This is one way to make much more granular reports based on your own needs.

Granularity: This can be either HOURLY, DAILY, or MONTHLY. It will break down the period into bite-sized chunks so you can have more reliable data.

Metric: The values for this parameter are explained in depth by Amazon, and the valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.

TimePeriod: Is the amount of time over which the report takes place. We’ve already created our value for this parameter and stored it in the $interval variable.

GroupBy: Although I’m not using this parameter today, this will allow you to organize the report so you can read it a little easier. You can group by Service, linked account, or even a tag!

Lets go ahead and run the cmdlet below:

PS> $costReport =
Get-CECostandUsage -Granularity DAILY -TimePeriod $interval -Metric
NetAmortizedCost

Once we submit this command, it will reach out via the Cost Explorer API, and we’ll have stored the report object in our $costReport variable! Although you can save the raw data for analyzing, I like to do a little formatting before storing it to make it easier to read later.

How to Format the Output of AWS Cost Management Reports

From my perspective, I want all of my systems and all of my teammates to be able to read and use any data that I have AWS output. What we can do is take the raw output from our Cost Explorer API query, convert it to a format that everyone can use, then store that data in S3 for us to be able to view later or share with the team.

For this, we’ll go ahead and convert the output of our report stored in the $costReport variable to JSON and save that file in a temporary file. We also need to keep in mind that the report has multiple tiers of output, so we’ll drill down in the object to only return our results, then we’ll need to use the -Depth parameter on the ConvertTo-JSON cmdlet to make sure we get all of the information we want.

PS> $costReport.ResultsByTime |
ConvertTo-JSON -Depth 3

By running just this command, you’ll get a ton of information back, so rather than doing all that, let’s write it to a file and then store that file in S3.

PS> $costReport.ResultsByTime |
ConvertTo-Json -Depth 3 | Out-File C:temp"$(Get-Date -format
'yyyy-MM-dd')-report.json"
PS> Write-S3Object -BucketName "my-cost-management-reports" -File C:temp"$(Get-Date -format 'yyyy-MM-dd')-report.json"

Now I can take the output of that report, share it with my team, and take any action on it that we see fit.

Conclusion

If you’re looking to create an AWS Cost Management report that you can run regularly on the cheap, this is the way to do it. With a per-run cost of approximately USD 0.01, I can run this report a few hundred times before I need to start worrying about the impending AWS bill at the end of the month. Since the output is JSON, it’s a straightforward report to read, and it’s effortless to manipulate this output to be used with various graphing and charting tools. With robust filtering, grouping, and tagging settings, these AWS Cost Management reports can be configured to drill down infinitesimally to give you the finest charges you receive from Amazon.

I hope you’ll agree with me that this is a very cost-effective way to see how much you are being billed and where you are being billed across your AWS deployment. By utilizing the features of PowerShell, you can quickly make these determinations and pivot where necessary.

Picture of Declan Gogan
Declan Gogan

Declan is a Channel & Alliance rep for N2WS. When he's not helping customers optimize their cloud environments and writing easy-to-understand technical content, you can find him spending time on the golf course, improving his game.

Read Also

You might also like