# Telegraf config for AWS erroring out

**URL:** <https://community.influxdata.com/t/telegraf-config-for-aws-erroring-out/323>\
**Category:** Systems\
**Tags:** telegraf\
**Created:** [March 22, 2017, 8:50pm UTC](https://community.influxdata.com/t/telegraf-config-for-aws-erroring-out/323 "2017-03-22T20:50:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpalanivelu](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@kpalanivelu](https://community.influxdata.com/u/kpalanivelu)\
**Post date:** [March 22, 2017, 8:50pm UTC](https://community.influxdata.com/t/telegraf-config-for-aws-erroring-out/323/1 "2017-03-22T20:50:27Z")

</div>

Hi,

My telegraf config has the following code to connect to AWS but finding the error in log. Can you please help?

Telegraf version is telegraf-1.1.2\_linux

Config:

```
###############################################################################
# OUTPUT PLUGINS #
###############################################################################

# # Configuration for AWS CloudWatch output.
# [[outputs.cloudwatch]]
# Amazon REGION
  region = "us-east-1"
  role_arn = "arn:aws:iam::ACC_NUMBER:role/ROLE_NAME"
  namespace = "my-jvmstats"

```

Error in telegraf.log

```
2017/03/22 20:38:32 E! Could not parse [agent] config
2017/03/22 20:38:32 E! Error parsing /opt/telegraf/telegraf.conf, line 87: field corresponding to `namespace' is not defined in `*config.AgentConfig'

```

Thanks  
Karthik

---

<div class="post-metadata">

**Author:** ![mark](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/mark/32/778_2.png) [@mark](https://community.influxdata.com/u/mark)\
**Post date:** [March 22, 2017, 8:53pm UTC](https://community.influxdata.com/t/telegraf-config-for-aws-erroring-out/323/2 "2017-03-22T20:53:22Z")

</div>

My wild guess would be that

```auto
# [[outputs.cloudwatch]]

```

needs to be uncommented.

---

<div class="post-metadata">

**Author:** ![kpalanivelu](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@kpalanivelu](https://community.influxdata.com/u/kpalanivelu)\
**Post date:** [March 23, 2017, 6:21pm UTC](https://community.influxdata.com/t/telegraf-config-for-aws-erroring-out/323/3 "2017-03-23T18:21:48Z")

</div>

Thank You; that solved it. But I am getting the following error if I use Role ARN:

> 2017/03/23 18:00:44 E! cloudwatch: Error in ListMetrics API call : NoCredentialProviders: no valid providers in chain. Deprecated.  
> For verbose messaging see aws.Config.CredentialsChainVerboseErrors  
> 2017/03/23 18:00:44 E! Failed to connect to output cloudwatch, retrying in 15s, error was ‘NoCredentialProviders: no valid providers in chain. Deprecated.  
> For verbose messaging see aws.Config.CredentialsChainVerboseErrors’  
> 2017/03/23 18:01:19 E! cloudwatch: Error in ListMetrics API call : NoCredentialProviders: no valid providers in chain. Deprecated.  
> For verbose messaging see aws.Config.CredentialsChainVerboseErrors  
> 2017/03/23 18:01:19 E! NoCredentialProviders: no valid providers in chain. Deprecated.

If I use Profile, Below Error:

> 2017/03/23 18:17:01 E! cloudwatch: Error in ListMetrics API call : SharedCredsLoad: failed to load shared credentials file  
> caused by: open /root/.aws/credentials: no such file or directory  
> 2017/03/23 18:17:01 E! Failed to connect to output cloudwatch, retrying in 15s, error was ‘SharedCredsLoad: failed to load shared credentials file  
> caused by: open /root/.aws/credentials: no such file or directory’  
> 2017/03/23 18:17:16 E! cloudwatch: Error in ListMetrics API call : SharedCredsLoad: failed to load shared credentials file  
> caused by: open /root/.aws/credentials: no such file or directory  
> 2017/03/23 18:17:16 E! SharedCredsLoad: failed to load shared credentials file  
> caused by: open /root/.aws/credentials: no such file or directory

Any recommendation here as we want the telegraf to generate the tokens based on role/profile to keep it simple.

Thank You
