CostAndUsage - Inadequate permission for linked account
Hey everyone!
I'm currently trying to poll for costs of the current account with the cost explorer service but I'm receiving following error:
Error: AccessDeniedException: Inadequate permission for linked account to see the cost with EDP discounts applied
While I'm aware, that I might have to grant or be granted permissions I don't know where even though I tried some variations like adding policies to the account user. Do I have to enable something at the payer account level or specify a linked account in the request parameters?
The code is the following:
input := &costexplorer.GetCostAndUsageInput{
Metrics: aws.StringSlice(\[]string{
"NetUnblendedCost",
}),
TimePeriod: &costexplorer.DateInterval{
Start: aws.String(start),
End: aws.String(end),
},
Granularity: aws.String("MONTHLY"),
}
result, err := costService.GetCostAndUsage(input)
Edited by: DennisLeanix on Nov 2, 2020 2:12 AM
Nevermind. The input request doc required a metric value like "NetUnblendedCost" which does not work.
You have to do it like NET_UNBLENDED_COST
Cheers
Hi Dennis,
How did you fix that? I tried to change NetUnblendedCost metric into NET_UNBLENDED_COST one but nothing happens.
Relevant questions
Reservations Bill Breakdown for Linked Account
asked 4 months agoAccount name changes are not reflected in Cost Explorer
asked 2 months agoHow can customers find out the S3 bucket with the highest cost or sort the cost for each S3 bucket?
Accepted Answerasked 2 years agoLambda Layer costs
asked 2 months agomy account get charged again
asked 4 months agoTransfer AWS Billing to another account within Organization
asked 5 months agoThere is nothing on my RDS databases but i keep getting charged for RDS usage
asked a month agoWill daily Cost Explorer costs history recover after disabling Hourly and Resource Level Granularity ?
Accepted Answerasked 8 days agoCostAndUsage - Inadequate permission for linked account
asked 2 years agoEnable IAM Access Analyzer to delegated admin account error: Access Analyzer Service Linked Role is not in the organizational management account
asked 5 days ago