Seperate Billing in AWS Account for two different EC2 Instance - amazon-web-services

I have two EC2 instances in a single AWS account. Both are running for different application services. Now, I want to make billing separate for that particular account. So, I can get the exact spent and charges for the applications and can manage my account as per that for separate accounting purposes.
Is it possible? If not, then can anyone suggest me a better way to achieve this?
I'm planning to handle the different AWS accounts for both services. But, it will be hard to manage so, I can't prefer that option.
For more, In Google Cloud, they're providing to handle different billing accounts within the same google cloud account. So, I think this concept might be available on AWS also.
Thanks in advance for any little bit of help or suggestion.

You can't get separate bills for different sets of resources within the same AWS account. However, you can filter out the costs for different sets of resources using tags. By using a distinct tag (or set of tags) in the resources you allocate to each application, you can get a breakdown of the cost for each application in billing reports and cost explorer. See the documentation for details and steps on how to set it up - https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html
I believe it's the same with Google Cloud as well - although you can have multiple billing accounts within your google account (the hierarchy in GC is different to AWS, and an AWS account is more similar to a GC project than a GC account), a project within your account must have one billing account and does not support multiples.

By this -
Now, I want to make billing separate for that particular account.
do you mean you already have 2 different AWS accounts? If yes, you can get billing details as per account if they become part of same Organization. Check AWS Organizations docs for more info.
With Orgs, you can view bills of different accounts from one account itself if it is part of org. Also your accounts get discounts for services.

Related

Is there a way to compare actual service limits for two AWS accounts?

We have a standby AWS account in case we lose access to our production account. We want to make sure that service limits are exactly the same for both accounts and stay in sync. Over time various service limits have been increased for the production account.
Is there a way to list all actual service limits for an account to make them easily comparable, ideally with the AWS CLI, boto3 or whatever?
The only way I can think of is manually going through both accounts' support cases and identify limit increases like that.
Not directly from CLI but https://awslimitchecker.readthedocs.io/en/latest/cli_usage.html may be useful to you.

Manage multiple aws accounts

I would like to know a system by which I can keep track of multiple aws accounts, somewhere around 130+ accounts with each account containing around 200+ servers.
I wanna know methods to keep track of machine failure, service failure etc.
I also wanna know methods by which I can automatically turn up a machine if the underlying hardware failed or the machine terminated while on spot.
I'm open to all solutions including chef/terraform automation, healing scripts etc.
You guys will be saving me a lot of sleepless nights :)
Thanks in advance!!
This is purely my take on implementing your problem statement.
1) Well.. for managing and keeping track of multiple aws accounts you can use AWS Organization. This will help you manage centrally with one root account all the other 130+ accounts. You can enable consolidated billing as well.
2) As far as keeping track of failures... you may need to customize this according to your requirements. For example: You can build a micro service on top of docker containers or ecs whose sole purpose is to keep track of failures, generate a report and push to s3 on a daily basis.You can further create a dashboard using AWS quicksight out of this reports in S3.
There can be another micro service which will rectify the failures. It just depends on how exhaustive and fine grained you want your implementation to be.
3) For spawning instances when spot instances are terminated, it can be achieved through you simple autoscaling configurations. Here are some of the articles you may want to go through which will give you some ideas:
Using Spot Instances with On-Demand instances
Optimizing Spot Fleet+Docker with High Availability
AWS Organisations are useful for management. You can also look at multiple account billing strategy and security strategy. A shared services account with your IAM users will make things easier.
Regarding tracking failures you can set up automatic instance recovery using CloudWatch. CloudWatch can also have alerts defined that will email you when something happens you don't expect, though setting them up individually could be time consuming. At your scale I think you should look into third party tools.

AWS consolidated billing on reserved instances

My AWS infrastructure is part of consolidated billing provided by our client company.
There may be other accounts for different companies and are part of consolidated billing.
So, when I reserve an instance, do all other accounts within the consolidated billing umbrella enjoy the privileges?
Does it make sense to have reserved instances in consolidated billing environment if you don't want to share the benefits with other accounts?
Yes, when you use consolidated billing the cost-savings of a reserved instance can be spread/shared to any of the 'child' accounts - just like the savings you may get by combing your total S3 storage (for example).

AWS account delineation for hosting multiple customers servers

We host our clients' infrastructure. We are looking at AWS for some services. However, our business model is to provide the hosting included in our fee so to that end we need to be the account holder. We therefore need to have one account which is billed but clear delineation between different separate client infrastructure. Ideally with a separate console etc. Is this possible? Thanks.
You should take a look at consolidated billing, as it sounds like it will meet your needs:
http://docs.aws.amazon.com/awsaccountbilling/latest/about/consolidatedbilling.html
This would enable you to set up unique "linked accounts" per customer, each fully separate and independent of each other (separate console logins, separate security configurations, etc.).

Merging Multiple AWS developer accounts?

I am working for two separate employers, on a project with similar goals. Both use Amazon EC2 for their servers, and both gave me an account to access their instances, with different userid and password pair, is it possible to have these 2 accounts be a subset of another account? So i can switch easily from one account to another from that main account?
No, not unless you want the superset account to also assume billing responsibility for the sub-accounts. I'm pretty sure neither you nor either of your two employers would appreciate being billed for the composite EC2 usage of both...
From a working-practices viewpoint, however, you can configure ElasticFox with any number of different account configurations and switch between them at the click of a dropdown.