AWS has no one-click authorization for third-party read access, so you grant it with a small CloudFormation stack. It creates a role this app can assume to read cost/usage data and resource metadata, never your code, data, or secrets.
RoleArn.source-material-export-readonly)
and click Next through the options.RoleArn value.The template trusts only this app's AWS identity, gated on a one-time external ID unique to this session. Feel free to review it before deploying:
AWSTemplateFormatVersion: '2010-09-09'
Description: Read-only role for source-material-export (technical due diligence)
Resources:
DueDiligenceReadOnlyRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
AWS: 'arn:aws:iam::828078129978:user/source-material-export'
Action: sts:AssumeRole
Condition:
StringEquals:
sts:ExternalId: '8trPYhGhexG_1RaC-lyCE-7oh2RvD5fU'
Policies:
- PolicyName: DueDiligenceReadOnly
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- ce:GetCostAndUsage
- ec2:DescribeInstances
- rds:DescribeDBInstances
- lambda:ListFunctions
- s3:ListAllMyBuckets
- s3:GetBucketLocation
- sts:GetCallerIdentity
Resource: '*'
Outputs:
RoleArn:
Description: Paste this back into the export page
Value: !GetAtt DueDiligenceReadOnlyRole.Arn
Cost data is optional. Cost history needs
Cost Explorer enabled on the account (AWS Billing → Cost Explorer → Enable,
management/payer account only, and it can take up to ~24h to activate). If it isn't
enabled you'll just see a note in the zip's _errors.txt and still get the full
resource inventory.
There is no cost to installing this CloudFormation stack, as the configuration only adds a simple API permission for the tool to retrieve your account metadata. No services are deployed, and there is no charge for adding the API permission.