aws-samples / aws-samples/amazon-cloudwatch-container-insights

IMDSv2 should be default and version should be configurable

Open
#131 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
178
Forks
117
Avg merge
1d 10h
Merged PRs (30d)
3

Description

Following the [docs on AWS](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-setup-logs-FluentBit.html), I end up with a fluent-bit that uses IMDSv1. Whereas the recommendation by AWS is to only use IMDSv2.

So the configmap `fluent-bit-cluster-info` should have an extra field to choose v1 vs v2. Also the default should be v2, not v1. However it doesn't seem like a default is possible, the user would have to choose one or the other. A helm chart would be so much easier. Any chance for that?

BTW https://github.com/aws/aws-for-fluent-bit/issues/177 discusses the issue I am having. In case others hit this issue, if you shell into one of the fluent-bit containers and run `/fluent-bit/bin/fluent-bit --version`, you will I get fluent-bit version, but this is not the same as the docker image version, which you can find in `/AWS_FOR_FLUENT_BIT_VERSION` file in the docker image:
```
bash-4.2# ls /
AWS_FOR_FLUENT_BIT_VERSION boot ecs etc home lib64 media opt root sbin sys usr
bin dev entrypoint.sh fluent-bit lib local mnt proc run srv tmp var
bash-4.2# more AWS_FOR_FLUENT_BIT_VERSION
2.28.5
bash-4.2#
```

Contributor guide

Open the contributing guide

Research direction

Start with the fluent-bit-cluster-info ConfigMap and the AWS Container Insights setup documentation referenced in the issue. Verify the current IMDS version behavior and image version using /fluent-bit/bin/fluent-bit --version and /AWS_FOR_FLUENT_BIT_VERSION. Done means the configuration can choose IMDSv1 or IMDSv2 and defaults to IMDSv2.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, devops, observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.