Loading...
 

AWS Billing and Cost Management

Amazon Web Services (AWS) bills your account or accounts, for usage, which ensures that you pay for only what you use. To help you manage your charges, AWS provides features that help you monitor your costs and pay your bill for one or many AWS accounts that you use in the cloud.1

Turn on AWS Cost and Usage reports

via AWS Command Line Interface

Create an S3 bucket
aws --profile myprofile1 --region us-east-1 s3 mb s3://bucket-name
Grant Permission
aws --profile myprofile1 --region us-east-1 s3api put-bucket-policy --bucket bucket-name --policy file://s3-policy.json
s3-policy.json file content
{
  "Version": "2012-10-17",
  "Statement": [
  {
    "Effect": "Allow",
    "Principal": {
      "AWS": "386209384616"
    },
    "Action": [
      "s3:GetBucketAcl",
      "s3:GetBucketPolicy"
    ],
    "Resource": "arn:aws:s3:::bucket-name"
  },
  {
    "Effect": "Allow",
    "Principal": {
      "AWS": "386209384616"
    },
    "Action": "s3:PutObject",
    "Resource": "arn:aws:s3:::bucket-name/*"
  }
  ]
}

Accounting Group

via AWS Command Line Interface

Create Accounting Group
aws --profile myprofile1 iam create-group --group-name AccountingGrp

Add user(s) to Accounting Group

Accounting Group Policy
aws --profile myprofile1 iam create-policy --policy-name AccountingGrpPolicy --policy-document file://iam-policy.json
iam-policy.json file content
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "aws-portal:ViewBilling",
            "Resource": "*"
        }
    ]
}
Last edited by MichaelAlber .
Page last modified on Friday November 23, 2018 22:25:48 UTC.