首页 > 解决方案 > 如何配置 aws 凭证以使用 fluentbit 设置 cloudwatch

问题描述

我需要使用 fluentbit 从本地系统上托管的应用程序将日志发送到 cloudwatch,但我无法配置 fluent bit 的 aws 凭据以将日志发送到 cloudwatch。如果有人可以帮助我,那将有很大帮助。部分日志如下:-

[aws_credentials] Initialized Env Provider in standard chain
[aws_credentials] Failed to initialized profile provider: $HOME not set and AWS_SHARED_CREDENTIALS_FILE not set.
[aws_credentials] Not initializing EKS provider because AWS_ROLE_ARN was not set
[aws_credentials] Initialized EC2 Provider in standard chain
[aws_credentials] Not initializing ECS Provider because AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is not set
[aws_credentials] Sync called on the EC2 provider
[aws_credentials] Init called on the env provider
[aws_credentials] Init called on the EC2 IMDS provider
[aws_credentials] requesting credentials from EC2 IMDS

标签: amazon-web-servicesamazon-cloudwatchfluentdfluent-bit

解决方案


任何传递凭据的标准方法都应该在这里工作:

  • 导出环境变量AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEY
  • 或 create ,可以为此~/.aws/credentials使用提示。aws configure

推荐阅读