Skip to content

Commit

Permalink
Retrieve aws credentials and check error (#13555)
Browse files Browse the repository at this point in the history
* Retrieve aws credentials and check error
  • Loading branch information
kaiyan-sheng authored Sep 25, 2019
1 parent cfdae76 commit cd867da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion x-pack/metricbeat/module/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ func NewMetricSet(base mb.BaseMetricSet) (*MetricSet, error) {

awsConfig, err := awscommon.GetAWSCredentials(config.AWSConfig)
if err != nil {
return nil, errors.Wrap(err, "failed to get aws credentials")
return nil, errors.Wrap(err, "failed to get aws credentials, please check AWS credential in config")
}

_, err = awsConfig.Credentials.Retrieve()
if err != nil {
return nil, errors.Wrap(err, "failed to retrieve aws credentials, please check AWS credential in config")
}

metricSet := MetricSet{
Expand Down

0 comments on commit cd867da

Please sign in to comment.