Amazon web services AWS Boto3:请求中包含的安全令牌对于AWS FORECAST无效
我试图在aws中查询forecast arn,但出现以下错误:Amazon web services AWS Boto3:请求中包含的安全令牌对于AWS FORECAST无效,amazon-web-services,amazon-forecast,Amazon Web Services,Amazon Forecast,我试图在aws中查询forecast arn,但出现以下错误: import boto3 client = boto3.client('forecastquery') response = client.query_forecast( ForecastArn=' ', StartDate='2018-12-31T00:00:00', EndDate='2019-12-31T23:00:00', Filters={ 'item_id':' '
import boto3
client = boto3.client('forecastquery')
response = client.query_forecast(
ForecastArn=' ',
StartDate='2018-12-31T00:00:00',
EndDate='2019-12-31T23:00:00',
Filters={
'item_id':' '
}
)
print(response)
botocore.exceptions.ClientError:发生错误
(UnrecognizedClientException)调用QueryForecast时
操作:请求中包含的安全令牌无效
你的钥匙有效吗?检查
~/.aws/credentials
中的凭据。尝试调用其他服务(例如S3list_bucket()
)以检查此问题是否与预测有关。