Grab my monthly bill via AWS api - amazon-web-services

I can't figure out how to make a simple call to display how much I owe Amazon for the month. Just want to display it for this internal dashboard I'm building. Any ideas? I'm not using cloudwatch

You should follow these directions:
http://docs.aws.amazon.com/awsaccountbilling/latest/about/programaccess.html
To tell AWS you would like your monthly bills dropped into an S3 bucket that you supply. Once its turned on, you can use the S3 API to read/download the bill and display it on your dashboard.
There is no 'real-time' billing API that I am aware of (kind of surprising given the technical sophistication of AWS).

Related

Weekly Billing reports in AWS

I am looking to configure a weekly billing report in AWS. It should contain the basic information like for last 7 days, $x is charged for the account. If is shows the services also, it will be good, but main focus is on the charged amount. The weekly billed amount should be sent over mail or SMS to inform users about the charges. Eg: $10 has been charged to your AWS acc id xyz in last week.
Is there any inbuilt AWS service which can be used or we need to write a custom script?
For now I have created a daily budget, using which I have set budget report to be sent every week. But that is not sufficient. Let me know if there is more sophisticated way present.
Thanks
You could check out the AWS Cost Explorer and build your own, custom report, that might look like this:
Go to your AWS Account -> Billing -> Cost Explorer -> Launch Cost Explorer.
NOTE: If you're running it for the first time, you need to enable it and wait approx. 24 hours for the initial data.
As of now, there's no out-of-the-box solution from AWS that sends the report as an email, but anyone interested might want to explore this repository - AWS Cost Explorer Report.

AWS SDK - Get metrics for S3 and SES

My question is simple, but I haven't found much by googling myself.
Is there a way to get metrics such as S3 total disk size in a Bucket?
Is there a way to get metrics on amount of emails sent per month using SES?
I am writing an admin tool where I want to track cloud usage basic metrics.
All this of course with the .Net Core AWS SDK.
Thanks,

What API can I use to see my GCP bill amount?

I would like to see my current bill on my GCP project. I tried using the Billing API and the Budget API but they just give me meta data information. No bill with costs on it. I would like to know the current bill cost for the month.
I know there is a Pub/Sub way to do this, but I don't want to get notified of the billing cost. I would like to see the bill cost when on demand.
At this moment as per the list of available 'Cloud billing APIs', GCP don't have such an API to view usage/total cost of a project. Here is the Feature Request for this.
As per the PIT there is no such API that would provide real-time billing cost and this is Feature Request as billing Engineering team working on this.

Filtering the detailed bill generated by AWS account according to Region in aws

I am working on a project and all the project resource is on 'me-south-1'
I have other resources things in other regions.
I need to send a detailed bill to the client.
could anyone suggest me,How can I filter it according to the region?
For detailed billing (with the ability to filter) the best approach is to use Cost Explorer.
By using this service you can apply a range of filters (including region), this can also be done programmatically.
Be aware that using this service does charge $0.01 per request.

View current number of requests and data transfer on Amazon S3

I use Amazon S3 to host static resources for a mobile app. Amazon bills the usage based on both the number of requests made to the resources and the volume of data retrieved. I'm looking for a way to view the current usage.
I'm new to AWS, and overwhelmed with the complexity of the AWS Management Console. There's "AWS Cost Explorer", "AWS Cloud Watch", "Usage Reports", etc. Many things can be installed, configured, downloaded and automated. I don't know where to start looking for a solution.
Is there a simple, graphical chart that just shows me the numbers for the past days?
For graphs and reporting that you are trying to view, I would use cost explorer in My Billing Dashboard for this as it gives you an option to bring up items from a service perspective. Click services once the graph comes up and it should give you an in-depth look at what S3 is spending daily. Also, another reporting tool you can look at is the Month-to-date-spend services and click bill details. It should give you a break down of what the costs are for S3.
For your comment you left on your post, AWS S3 is one of the best for static content that won't be changed over time as it offers versioning and other great resources for your content. You can even use CloudFront to help distribute those resources as well for a better user experience
Hope this helps!
You could use the metrics option available in S3 to get the number of s3 reads made per second.
Steps to view the S3 Bucket
Search for S3 bucket in the S3 Bucket Search Box.
Once the S3 bucket comes up in the results box, click on the S3 bucket
S3 bucket opens up, click on Management tab
Once Management tab opens up, click on Metrics button and click on Requests option
Its paid option, once its enabled, you could enable number of get request for the per day/week/month.
A detailed document on how to enable could be AWS document page --> https://docs.aws.amazon.com/AmazonS3/latest/user-guide/configure-metrics.html
Once you have the number of requests per month, you could use the aws simple calculator to get the cost -->https://calculator.s3.amazonaws.com/index.html