Reputation: 39
Need some information on the boto3. I am trying to the fetch the cost explorer as per the link (https://boto3.readthedocs.io/en/latest/reference/services/ce.html#client)
But I get an error saying there is no service called CE. I am trying from lambda.
import boto3
clt = boto3.client('ce')
print clt
Error:
module initialization error: Unknown service: 'ce'. Valid service names are: acm, apigateway, application-autoscaling, appstream, athena, autoscaling, batch, budgets, clouddirectory, cloudformation, cloudfront, cloudhsm, cloudhsmv2, cloudsearch, cloudsearchdomain, cloudtrail, cloudwatch, codebuild, codecommit, codedeploy, ...........
Can anyone help on the getting this service executing successfully or any other alternative way to get cost explorer via api.
Upvotes: 2
Views: 1664
Reputation: 41
try updating also botocore
pip install -U botocore
I've had the same problem with a recently installed boto3 an the botocore update resolved the issue, i have now botocore-1.8.0
Cheers
Upvotes: 1
Reputation: 81454
Cost Explorer was just released. In the CLI you need version 1.11.190 or newer which was released yesterday. I do not see an update to boto3 yet that supports Cost Explorer. If you directly use botocore, version 1.7.48 supports Cost Explorer.
Upvotes: 0