1

AWS newbie here.

I have an application running on EC2 in my AWS account that I am building for a client. I would like the client to somehow be able to pay the monthly operational cost of the EC2 instance, while still giving me full control over operations. Is there a way to have a third party account be able to pay the billing for a specific EC2 instance? If not, what are suggested workarounds?

Clarification, copied from comment

To clarify my needs, I am a contractor and have built an application for a company. The person who originally hired me has been fired from the company and my invoice is being questioned by the finance department. I want to allow the company to use the application while we sort this matter out, but still want to have control over the app as a leverage point in case they get shady. I do not want to incur the operational costs but still allow them to run the app while the review process happens

1
  • Do you just need access to a single EC2 instance, or do you need console access to start / stop / etc as well?
    – Tim
    Jun 4, 2017 at 5:35

2 Answers 2

1

Short Answer The customer owns the account, including admin rights, and grants you only the permissions you need. Create an IAM policy as per this question, attach it to a group, put your user in that group, make sure you have no other permissions. If you need SSH access you have the private key of the EC2 instance.

Long Answer

If you need access to a single EC2 instance then you just have the customer own the account and you have a private key to log into the instance.

If you need console access you need an IAM user with policies that allow specific access for different users. The customer would own the account, and as per standard they'd have both the owner account with billing access they don't use, and an admin account for day to day administration.

The admin account creates a policy that gives you EC2 access. This would grant you console access, and could give you permission to start and stop either a specific instance or any instance. It's actually very fine grained, it can be restricted by instance ID, tag, or all kinds of things.

Generally I create a policy or policies, assign them to groups, and then add a user to the group. That makes things easier if you have multiple users.

AWS has IAM policies information for EC2 here. There are some example polices here and here. None are quite right. The policy in the answer to this question is probably very close to what you need.

IAM is moderately complex to do well, and there are gotchas. You could read the documentation and watch the Re:Invent IAM sessions. You could pay someone qualified to do it for you. If you make your question specific enough about what you really need I could probably write a policy, but you're probably better off understanding it yourself. You can probably figure it out with the documentation, Re:Invent, and the IAM policy generator. There will be plenty of pre-written policies on the AWS website.

Update based on comment

In this situation consolidated billing is the best solution. It means the organisation can pay the bill without having any access to the account. If they own the account and give you access they have full access, which doesn't seem ideal for this situation.

4
  • Thanks Tim for the detailed reply, I am currently reading up on IAM Policies right now to see if it will fit my use case.
    – Paul T
    Jun 5, 2017 at 19:10
  • To clarify my needs, I am a contractor and have built an application for a company. The person who originally hired me has been fired from the company and my invoice is being questioned by the finance department. I want to allow the company to use the application while we sort this matter out, but still want to have control over the app as a leverage point in case they get shady. I do not want to incur the operational costs but still allow them to run the app while the review process happens.
    – Paul T
    Jun 5, 2017 at 19:14
  • That's a frustrating situation. Consolidated billing is ideal for this situation, as they can pay the bill but have no access to resources in the account. If they don't have an existing account they can create one easily. They could give you a credit card number for billing. If you give them authority over the account you'll lose your leverage.
    – Tim
    Jun 5, 2017 at 19:51
  • > agree with. Short Answer The customer owns the account, including admin rights, and grants you only the permissions you need. Create an IAM policy as per this question, attach it to a group, put your user in that group, make sure you have no other permissions. If you need SSH access you have the private key of the EC2 instance.
    – Net Runner
    Jun 5, 2017 at 20:39
1

You can use consolidated billing in AWS organizations

Another option is to segment billing and administrative access of a single account using IAM roles restricting one role to billing related policies and another role to operational and engineering tasks.

1
  • IAM policies specify user or group permissions. IAM roles are assigned to EC2 instances to give them access to other AWS resources. Also consolidated billing isn't really relevant.
    – Tim
    Jun 4, 2017 at 5:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .