Amazon Web Service Usage Cost through Command Line - amazon-web-services

I am working on Amazon Web Service (EC2, S3) to set up an instances given the following detail on the account. (I don't have administrative rights to the Amazon account through the web browser)
Amazon Account Number
Access Key ID
Secret Access Key
Do anyone know how can I check the total usage cost spent through command line interface? I wouldn't want to give the owner a surprise of how much Amazon have charged him at the end of the month.
P.S.: To date of writing Amazon does not provide account charges information through the command line or API (According to #Eric Hammond). If Amazon does in the later date, please give me a head up. Thanks!

Amazon AWS does not currently provide account charges information through the command line or API.
Accrued account charges can be viewed through a login on the AWS web site:
http://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=activity-summary

Related

AWS: how to see the services a particular user account has been using

I'm the administrator of an AWS account that has 4 users. One of the users is racking up higher-than-expected costs.
I checked the Cost Explorer, but could not seem to configure it to view individual users.
As an administrator in AWS, how do I see all of the services this particular user has been using during a given period of time (e.g. the last 12 months)?
Thanks!
AWS resources are associated with an AWS Account, not a specific user.
If a user has the necessary permissions to create resources (eg an Amazon EC2 instance), then the instance is launched in the AWS Account, but there is no link back to the user that requested the resource.
You can, however, use AWS CloudTrail:
AWS CloudTrail is an AWS service that helps you enable operational and risk auditing, governance, and compliance of your AWS account. Actions taken by a user, role, or an AWS service are recorded as events in CloudTrail. Events include actions taken in the AWS Management Console, AWS Command Line Interface, and AWS SDKs and APIs.
It will show all API calls made by the user, including the Action ('launch an EC2 instance'), their IP address, timestamp, etc. Operations in the AWS management console will also be shown, since it makes API calls on behalf of the user.
CloudTrail keeps a history of the past 90 days, but you can create specific 'Trails' that retain data permanently. If you have not done this, then it will not be possible to see what they did prior to 90 days ago.

How to get the List of AWS Services which I am using in my AWS Account

I want to get a list of Active AWS Services which I am using in my AWS Account.
Thanks In Advance
The simple method I use is just to go into the Billing service and then into the Bills. You select the actual month and You should see all the charges for the services You use. 0$ means that Yo've used the service in the past.
Example:

Transfer AISPL account to AWS account

I want to transfer my account from AISPL to AWS. This is because, I had been running my application in AISPL account till now. Now I want to add my account to an AWS organisation of my employer whose seller of record is AWS. So that my employer can take care of all the consolidated billings in USD.
Currently, adding AISPL account into AWS account organisation is not supported and shows an error response of "You can only join an organization whose Seller of Record is same as your account".
What can I do to transfer my AWS account from AISPL to AWS so that I can add my account to AWS organisation ?
I had posted a query on AWS support for this and got the below reply.
Hello,
I understand you would like to update your AISPL account and utilize services from Amazon Web Services Inc. instead.
At this time your account utilizes services from AISPL (Amazon Internet Services Private Limited) which is the Indian AWS reseller for Indian customers.
The main difference between AWS accounts and AISPL accounts is the seller of record. AISPL accounts are administered by Amazon Internet Services Private Limited, but AWS accounts are administered by Amazon Web Services, Inc.
Accounts located in AISPL can update their account information, but will continue to be billed in INR and utilize services from AISPL. If you wish to utilize services from Amazon Web Services Inc. and update your preferred currency, then you will need to create a new AWS account.
More information can be found using the link below:
https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-account-payment-aispl.html#determine-seller
We cannot transfer an account from AISPL to AWS. Need to create a new account for this.

Amazon EC2 Billing APIs?

I am wondering if it is possible to see billing information through the Amazon SDK/APIs. Specifically, I want to see how much EC2 instances are costing the account. Is it feasible to have it break down by user if it is an IAM account, or breakdown by account if you are using consolidated billing?
I have seen ways of doing this by either creating an S3 bucket to have billing info dumped into, or using CloudWatch APIs which require the user to pay. Is there an easier way to get EC2 billing information through just API calls or the SDK?
Billing information can be provided as records in an Amazon S3 bucket. You can then analyze the content of those files to obtain the information you list.
It is not possible to obtain the billing records themselves via an API call.
See: Cost and Usage Report
(The older Detailed Billing Report is scheduled to be retired.)

How can I create a amazon sandbox account for developer purpose?

How can I create a amazon sandbox account for developer purpose using a dummy credit card number?
I searched lot in amazon website and Google but no information is available for developer. They ask for original credit card access.
UPDATE
As seen in the comments to this post, Amazon no longer provides a staging / test environment.
How-to: Amazon Marketplace Web Services (MWS) Staging Account
We’ve been working on custom web application that integrates our client’s platform with Amazon’s storefront. Trying to understand how a development environment is setup through Amazon is a tricky task. It required hours of scouring Google for answers, contacting Amazon MWS support and hours of waiting. Hopefully this post can be a cheat sheet for developers trying to learn Amazon’s system.
Step 1:
Signup for a seller account on Amazon and select the Professional option. Go through the entire process and fill out you company name and address for your development account. You shouldn’t have to add a credit card or tax documentation even though it asks.
Step 2:
Login to your newly created account and open up a help ticket. Explain what you are developing and the reasons you need a “staging account“. Amazon should respond with instructions and the new account you created should be a development account. It should have all the normal features of a real Amazon account except that you can’t sell on the real Amazon.com, only in ungated categories on the staging version of Amazon. Also request the staging URL and credentials for testing orders at the same time.
Step 3:
After you’ve been informed by Amazon that Step 2 is complete, you can sign up with MWS as a developer. You should receive 5 things back:
Merchant ID
Marketplace ID
Developer Account #
AWS Access Key ID
Secret Key
You will then be able to send your client(s) to the same signup page with your developer ID. You application will then use #2,4,5 for every single client while only replacing #1 for each client’s requests.
Step 4:
Testing orders was one of the most unusual ways we have ever tested. It requires you to signin to: https://mt.amazon.com with the credentials you received in step 2. To test an order you must first list your products in your staging account. Then you must logout of your staging account, login to a real Amazon account and purchase items with a real account and credit card. For this reason Amazon suggests setting all pricing and shipping to $0.01.
Conclusion
Hopefully this helps save some time for many of you as it took our team hours to compile and learn all of the information above from Google and Amazon MWS support.
You can get all inforamtion related to Amazon Sandbox account From Here
CreditCard is for verification only that you are not some milicious user.