AWS access policy for the FinOps Sprint | OptimyCloud

AWS access policy for the FinOps Sprint

This is exactly what we ask for to audit your AWS bill. Read it, have your security team review it, and remove anything you are not comfortable with: you create the role yourself.

What the role allows

Reading billing data (Cost Explorer, Savings Plans, budgets, AWS recommendations), listing resources (instances, volumes, databases, clusters, NAT, load balancers, buckets) and reading their CloudWatch metrics.

What it denies

Reading the content of your S3 buckets, your secrets, SSM parameters, logs, DynamoDB tables, Lambda code and environment variables, EC2 user data. No write action is granted.

Before the audit: no access at all

The free pre-diagnostic only uses a Cost Explorer export (CSV) that you send us. The role below is only created once the audit is ordered and the NDA signed.

1. Permissions policy

Read-only, actions listed one by one (no generic ec2:Describe*, which would expose user data). An explicit Deny block also closes access to data and secrets, even if another policy attached to the role allowed it.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "BillingAndRecommendations",
      "Effect": "Allow",
      "Action": [
        "ce:Get*",
        "ce:Describe*",
        "ce:List*",
        "cur:DescribeReportDefinitions",
        "budgets:ViewBudget",
        "savingsplans:DescribeSavingsPlans",
        "compute-optimizer:Get*",
        "compute-optimizer:Describe*",
        "cost-optimization-hub:ListRecommendations",
        "cost-optimization-hub:GetRecommendation",
        "cost-optimization-hub:ListRecommendationSummaries",
        "pricing:GetProducts",
        "pricing:DescribeServices"
      ],
      "Resource": "*"
    },
    {
      "Sid": "ResourceMetadata",
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeRegions",
        "ec2:DescribeInstances",
        "ec2:DescribeInstanceTypes",
        "ec2:DescribeReservedInstances",
        "ec2:DescribeVolumes",
        "ec2:DescribeSnapshots",
        "ec2:DescribeAddresses",
        "ec2:DescribeNatGateways",
        "ec2:DescribeVpcs",
        "ec2:DescribeSubnets",
        "ec2:DescribeVpcEndpoints",
        "ec2:DescribeTransitGateways",
        "elasticloadbalancing:DescribeLoadBalancers",
        "elasticloadbalancing:DescribeTargetGroups",
        "elasticloadbalancing:DescribeTargetHealth",
        "autoscaling:DescribeAutoScalingGroups",
        "rds:DescribeDBInstances",
        "rds:DescribeDBClusters",
        "rds:DescribeDBSnapshots",
        "rds:DescribeDBClusterSnapshots",
        "rds:DescribeReservedDBInstances",
        "elasticache:DescribeCacheClusters",
        "elasticache:DescribeReservedCacheNodes",
        "eks:ListClusters",
        "eks:DescribeCluster",
        "eks:ListNodegroups",
        "eks:DescribeNodegroup",
        "s3:ListAllMyBuckets",
        "s3:GetBucketLocation",
        "s3:GetLifecycleConfiguration",
        "s3:GetBucketVersioning",
        "s3:GetIntelligentTieringConfiguration",
        "logs:DescribeLogGroups",
        "cloudwatch:GetMetricData",
        "cloudwatch:GetMetricStatistics",
        "cloudwatch:ListMetrics"
      ],
      "Resource": "*"
    },
    {
      "Sid": "NoAccessToDataOrSecrets",
      "Effect": "Deny",
      "Action": [
        "s3:GetObject",
        "s3:GetObjectVersion",
        "s3:ListBucket",
        "secretsmanager:GetSecretValue",
        "ssm:GetParameter",
        "ssm:GetParameters",
        "ssm:GetParametersByPath",
        "kms:Decrypt",
        "logs:GetLogEvents",
        "logs:FilterLogEvents",
        "dynamodb:GetItem",
        "dynamodb:Query",
        "dynamodb:Scan",
        "lambda:GetFunction",
        "lambda:GetFunctionConfiguration",
        "ec2:DescribeInstanceAttribute",
        "ec2:DescribeLaunchTemplateVersions",
        "ec2:GetPasswordData",
        "rds:DownloadDBLogFilePortion",
        "ssm:GetParameterHistory",
        "secretsmanager:BatchGetSecretValue",
        "dynamodb:BatchGetItem",
        "athena:GetQueryResults",
        "rds-data:ExecuteStatement",
        "ec2:GetConsoleOutput"
      ],
      "Resource": "*"
    }
  ]
}

The bill is analysed through Cost Explorer (including resource-level granularity if you have enabled it). The role does not read Cost and Usage Report files stored in S3: if you use the CUR and want a finer analysis, you can send us an export yourself.

2. Trust policy

Only OptimyCloud's AWS account can assume the role, and only with the unique ExternalId we give you at kick-off. This protects against the "confused deputy" problem.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": { "AWS": "arn:aws:iam::OPTIMYCLOUD_ACCOUNT_ID:root" },
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": { "sts:ExternalId": "YOUR_UNIQUE_EXTERNAL_ID" }
      }
    }
  ]
}

3. Create and revoke the role

  1. IAM console → Roles → Create role → "Another AWS account", with the account ID and ExternalId we send you.
  2. Create a custom policy with the JSON from step 1 and attach it to the role (suggested name: OptimyCloudFinOpsAudit).
  3. Send us the role ARN. The audit starts: 7 business days.
  4. At the end of the audit, delete the role. You can also delete it at any time: access stops immediately.

Unsure about a line, or spotted a permission we don't need? Email alexandre@optimycloud.com and we will fix the published policy.

Start without giving any access

Free pre-diagnostic from a simple Cost Explorer export.

Request my pre-diagnostic