管理新遗物的滚动 aws 凭据的最佳方法是什么?

What is the best way to manage rolling aws credentials to new relic?

我的 aws 凭证正在为其中一个角色轮换。这个url:

$ curl http://169.254.169.254/latest/meta-data/iam/security-credentials/newrelicrole

总是给我 aws 上 newrelicrole 角色的最新凭据,我希望能够使用更新的访问密钥和密钥填充环境以填充 new relic plugin config

除了 运行 获取响应并重新填充环境的 cron 作业之外,最好的方法是什么?

如果您抓取密钥的元数据提要并将其放入静态文件中,那您就错了——这些密钥每四个小时轮换一次。

If you look at line 26 in the plugin config,你会看到答案。启用它并禁用 access/secret 键配置。

  #Use the following line disable the key checks and enable usage of AWS instance metadata for setting keys
  use_aws_metadata: true