Last reviewed 7 November 2026
Security
For whoever reviews CostCapper before it goes into your AWS account: exactly what it can do there, what it stores, what leaves your account and how updates are trusted. Everything below comes from the CloudFormation template you launch.
Download the one-page summary (PDF)
At a glance
- It runs as one small EC2 instance in your account, launched by one CloudFormation stack. There is no CostCapper service you sign up to.
- Its IAM role can describe, start and stop EC2 instances, RDS databases and Aurora clusters, and add or remove one tag of its own. It can't create, change, resize or delete anything, and it can never start or stop itself.
- It has no login to your machines and never sees what runs on them.
- No SSH. Inbound HTTPS only, from the address range you choose.
- Nothing is sent to us except an hourly machine count through AWS Marketplace (from launch), update downloads, and feedback a person chooses to send.
The IAM role, statement by statement
This is every permission the appliance's role has: no AWS managed policies, nothing hidden. The page is generated from the template, so it changes when the template does.
| Statement | What it allows | Limited to | Actions |
|---|---|---|---|
| Read | See instances, their status and disks, databases and their tags, CPU metrics and AWS prices. Read-only. | Everything it reads | ec2:DescribeInstancesec2:DescribeInstanceStatusec2:DescribeRegionsec2:DescribeVolumesrds:DescribeDBInstancesrds:DescribeDBClustersrds:ListTagsForResourcecloudwatch:GetMetricDatapricing:GetProducts |
| StartStopEC2 | Start and stop EC2 instances. | Instances in this account; with Scope = tagged, only those tagged scheduler-managed=true | ec2:StartInstancesec2:StopInstances |
| NeverStopItself (deny) | An explicit deny: it can never start or stop itself, whatever else allows. | Anything tagged costcapper:appliance=true, which is the appliance | ec2:StartInstancesec2:StopInstances |
| StartStopRDSInstances | Start and stop RDS databases. | DB instances in this account; with Scope = tagged, only tagged ones | rds:StartDBInstancerds:StopDBInstance |
| StartStopAuroraClusters | Start and stop Aurora clusters. | Aurora clusters in this account; with Scope = tagged, only tagged ones | rds:StartDBClusterrds:StopDBCluster |
| MarkManagedEC2 | Add or remove its one tag on instances it manages, so the failsafe knows what to stop. | Only the tag key costcapper:managed; a call naming no keys is refused | ec2:CreateTagsec2:DeleteTags |
| MarkManagedRDS | The same tag on databases and clusters it manages. | Only the tag key costcapper:managed; a call naming no keys is refused | rds:AddTagsToResourcerds:RemoveTagsFromResource |
| AttachOwnDataVolume | Attach its own data disk when it starts. | Only the volume and instance this stack created | ec2:AttachVolume |
| OwnSettings | Read its own settings from Parameter Store. | Parameters under /costcapper | ssm:GetParametersByPath |
| Heartbeat | Record that it's alive, for the failsafe. | One parameter, /costcapper/heartbeat | ssm:PutParameter |
| DecryptOwnSecrets | Decrypt its own encrypted settings, such as the email password. | Only through Parameter Store, where it can read only /costcapper | kms:Decrypt |
| MarketplaceMetering | Report the hourly count of managed machines to AWS Marketplace for billing. | Its own product listing | aws-marketplace:MeterUsage |
| SessionManager | Let you open a Session Manager session on the appliance, with your own IAM identity, instead of SSH. | The appliance's own SSM Agent; no Run Command | ssm:UpdateInstanceInformationssmmessages:CreateControlChannelssmmessages:CreateDataChannelssmmessages:OpenControlChannelssmmessages:OpenDataChannel |
| send-email (optional) | Send notification email through Amazon SES in your account. | Only if you set AllowSesEmail | ses:SendEmail |
| encrypted-volumes (optional) | Let EC2 use your keys to start instances whose disks they encrypt. | Only the KMS keys you list, and only grants for AWS services | kms:CreateGrant |
Scope is a launch choice: all (the default) lets it manage any machine except itself, and you pick which ones in setup; tagged makes AWS itself refuse anything not tagged scheduler-managed=true.
Show the role exactly as it is in the template
Role:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- { Effect: Allow, Principal: { Service: ec2.amazonaws.com }, Action: sts:AssumeRole }
# No AWS managed policies: AmazonSSMManagedInstanceCore would allow ssm:GetParameter(s) on
# every parameter in the account, which with DecryptOwnSecrets means every SecureString.
Policies:
- PolicyName: costcapper
PolicyDocument:
Version: "2012-10-17"
Statement:
- Sid: Read
Effect: Allow
Action:
- ec2:DescribeInstances
- ec2:DescribeInstanceStatus
- ec2:DescribeRegions
- ec2:DescribeVolumes
- rds:DescribeDBInstances
- rds:DescribeDBClusters
- rds:ListTagsForResource
- cloudwatch:GetMetricData
- pricing:GetProducts
Resource: "*"
- Sid: StartStopEC2
Effect: Allow
Action: [ec2:StartInstances, ec2:StopInstances]
Resource: !Sub arn:${AWS::Partition}:ec2:*:${AWS::AccountId}:instance/*
Condition: !If
- TaggedScope
- { StringEquals: { "aws:ResourceTag/scheduler-managed": "true" } }
- !Ref AWS::NoValue
- Sid: NeverStopItself
Effect: Deny
Action: [ec2:StartInstances, ec2:StopInstances]
Resource: "*"
Condition: { StringEquals: { "aws:ResourceTag/costcapper:appliance": "true" } }
- Sid: StartStopRDSInstances
Effect: Allow
Action: [rds:StartDBInstance, rds:StopDBInstance]
Resource: !Sub arn:${AWS::Partition}:rds:*:${AWS::AccountId}:db:*
Condition: !If
- TaggedScope
- { StringEquals: { "rds:db-tag/scheduler-managed": "true" } }
- !Ref AWS::NoValue
- Sid: StartStopAuroraClusters
Effect: Allow
Action: [rds:StartDBCluster, rds:StopDBCluster]
Resource: !Sub arn:${AWS::Partition}:rds:*:${AWS::AccountId}:cluster:*
Condition: !If
- TaggedScope
- { StringEquals: { "rds:cluster-tag/scheduler-managed": "true" } }
- !Ref AWS::NoValue
# Discovery tags each managed machine costcapper:managed=true, which the failsafe
# stops, and removes the tag when it stops managing one. Only that one tag key:
# the Null check stops a DeleteTags call that names no keys (which deletes them all).
- Sid: MarkManagedEC2
Effect: Allow
Action: [ec2:CreateTags, ec2:DeleteTags]
Resource: !Sub arn:${AWS::Partition}:ec2:*:${AWS::AccountId}:instance/*
Condition:
ForAllValues:StringEquals: { "aws:TagKeys": ["costcapper:managed"] }
"Null": { "aws:TagKeys": "false" }
- Sid: MarkManagedRDS
Effect: Allow
Action: [rds:AddTagsToResource, rds:RemoveTagsFromResource]
Resource:
- !Sub arn:${AWS::Partition}:rds:*:${AWS::AccountId}:db:*
- !Sub arn:${AWS::Partition}:rds:*:${AWS::AccountId}:cluster:*
Condition:
ForAllValues:StringEquals: { "aws:TagKeys": ["costcapper:managed"] }
"Null": { "aws:TagKeys": "false" }
# costcapper-prepare attaches the data volume itself (see DataVolumeParameter).
# CloudFormation tags both with the stack's ID, so only this stack's pair qualifies.
- Sid: AttachOwnDataVolume
Effect: Allow
Action: ec2:AttachVolume
Resource:
- !Sub arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:volume/*
- !Sub arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:instance/*
Condition:
StringEquals: { "aws:ResourceTag/aws:cloudformation:stack-id": !Ref AWS::StackId }
- Sid: OwnSettings
Effect: Allow
Action: ssm:GetParametersByPath
Resource: !Sub arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter/costcapper
- Sid: Heartbeat
Effect: Allow
Action: ssm:PutParameter
Resource: !Sub arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter/costcapper/heartbeat
- Sid: DecryptOwnSecrets
Effect: Allow
Action: kms:Decrypt
Resource: "*"
Condition: { StringEquals: { "kms:ViaService": !Sub "ssm.${AWS::Region}.amazonaws.com" } }
- Sid: MarketplaceMetering
Effect: Allow
Action: aws-marketplace:MeterUsage
Resource: "*"
# Session Manager's minimum, so admins reach the appliance without SSH. No ec2messages,
# so Run Command can't be used on it, and no ssm:GetParameter(s).
- Sid: SessionManager
Effect: Allow
Action:
- ssm:UpdateInstanceInformation
- ssmmessages:CreateControlChannel
- ssmmessages:CreateDataChannel
- ssmmessages:OpenControlChannel
- ssmmessages:OpenDataChannel
Resource: "*"
- !If
- SesEmail
- PolicyName: send-email
PolicyDocument:
Version: "2012-10-17"
Statement:
- { Effect: Allow, Action: ses:SendEmail, Resource: "*" }
- !Ref AWS::NoValue
- !If
- HasKmsKeys
- PolicyName: encrypted-volumes
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action: kms:CreateGrant
Resource: !Ref KmsKeyArns
Condition: { Bool: { "kms:GrantIsForAWSResource": "true" } }
- !Ref AWS::NoValue
Tags: [{ Key: Project, Value: CostCapper }]The failsafe's own role
A small Lambda function (optional, on by default) has a separate role: ec2:DescribeInstances, ec2:DescribeRegions, ec2:StopInstances, logs:CreateLogStream, logs:PutLogEvents, rds:DescribeDBClusters, rds:DescribeDBInstances, rds:StopDBCluster, rds:StopDBInstance, sns:Publish, ssm:GetParameter. It can stop, never start, and only machines tagged costcapper:managed=true.
Show the failsafe role exactly as it is in the template
FailsafeRole:
Type: AWS::IAM::Role
Condition: Failsafe
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- { Effect: Allow, Principal: { Service: lambda.amazonaws.com }, Action: sts:AssumeRole }
Policies:
- PolicyName: failsafe
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action: [logs:CreateLogStream, logs:PutLogEvents]
Resource: !GetAtt FailsafeLogs.Arn
- Effect: Allow
Action: [ec2:DescribeRegions, ec2:DescribeInstances, rds:DescribeDBInstances, rds:DescribeDBClusters]
Resource: "*"
- Effect: Allow
Action: ec2:StopInstances
Resource: !Sub arn:${AWS::Partition}:ec2:*:${AWS::AccountId}:instance/*
Condition: { StringEquals: { "aws:ResourceTag/costcapper:managed": "true" } }
- Effect: Allow
Action: rds:StopDBInstance
Resource: !Sub arn:${AWS::Partition}:rds:*:${AWS::AccountId}:db:*
Condition: { StringEquals: { "rds:db-tag/costcapper:managed": "true" } }
- Effect: Allow
Action: rds:StopDBCluster
Resource: !Sub arn:${AWS::Partition}:rds:*:${AWS::AccountId}:cluster:*
Condition: { StringEquals: { "rds:cluster-tag/costcapper:managed": "true" } }
- Effect: Allow
Action: ssm:GetParameter
Resource: !Sub arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter/costcapper/heartbeat
- Effect: Allow
Action: sns:Publish
Resource: !Ref FailsafeTopicNetwork
- Inbound: TCP 443 (HTTPS), from the address range you set (default
10.0.0.0/8). A private subnet you reach over VPN or Direct Connect is recommended. - Outbound: TCP 443 (AWS APIs and sign-in), TCP 587 (SMTP email).
- No SSH. Use AWS Session Manager, which works with your own IAM identity and leaves a record in your account.
What it stores and what leaves your account
- Stored, in your account: machine names, IDs and states, people's names and email addresses, its settings and its audit log, on an encrypted EBS volume. Secrets such as an SMTP password are SecureString parameters under
/costcapper. - To AWS Marketplace, from launch: an hourly count of managed machines, for billing. Early-access installs send nothing.
- From costcapper.com: when it checks for updates, it downloads a signed release list and, if you install one, the release bundle. These requests carry no account data; like any web request, they show our content delivery network the appliance's IP address.
- To us, only when someone presses Send: the in-app feedback form, which first shows the person exactly what it will send. Admins can turn the form off.
- Never: your application data, machine contents, credentials or telemetry.
How updates are trusted
CostCapper updates itself from signed releases published at costcapper.com. The appliance trusts a release only if all of these hold:
- The release list is signed by our key in AWS KMS (ECDSA P-256). The public half is built into the app, so changing the website, its bucket or its CDN isn't enough to ship code.
- The list names the channel the appliance asked for, hasn't expired (lists last 90 days and are re-signed monthly), and offers a newer version than the one installed, so old lists can't be replayed and versions can't be rolled back.
- The bundle's SHA-256 hash and size match the list, every Python package matches a pinned hash, and the bundle can only unpack inside its own folder.
- Only a protected release workflow, which needs an approval, can use the signing key.
The web app can download an update but can't install it. A separate root service checks everything again, installs it next to the running version, backs up the database, switches over and waits for a health check, and puts the previous version back if that fails. The operating system's security updates install themselves nightly.
If CostCapper itself stops
The appliance writes a heartbeat to Parameter Store. Each night, the failsafe function checks it; if CostCapper hasn't checked in for 30 minutes, it stops the machines CostCapper manages and, if you gave an email address, tells you. Machines tagged scheduler-failsafe=exempt are left alone.
Removing it
Delete the CloudFormation stack. Your machines are left as they are. Stop managing them first and the costcapper:managed tags come off too. The data volume is kept as a snapshot.
Reporting a security problem
Email hello@costcapper.com with "Security" in the subject. Please give us a chance to fix the problem before you share details publicly. Our security.txt has the same contact.