We fabricated a workload equivalent to 10,000 users. Using our existing C9 instance didn't add a thing to our bill. A Spot Instance came online for a few minutes. It cost 10 cents. That has zero impact on our production east traffic. Pretty sweet! Let's look at our billing page. Oh wait, we don't have access, so let's create that access:
- Create
billingIAM.tf
as follows:
resource "aws_iam_group_policy_attachment" "test-attach" { group = "${aws_iam_group.billpayers.name}" policy_arn = "arn:aws:iam::aws:policy/job-function/Billing" } resource "aws_iam_group" "billpayers" { name = "billpayers" path = "/users/" } resource "aws_iam_group_membership" "billinggroup" { name = "billing-group-membership" users = [ "cloudpatterns", ] group = "${aws_iam_group.billpayers.name}" }
That totally did not work. Apparently, the root user needs to enable IAM billing access. That makes sense. We can do that in the GUI.
- Click on
My Account
and go to the section entitledIAM User...