takus / fluent-plugin-ec2-metadata

Fluentd output plugin to add Amazon EC2 metadata into messages
Other
44 stars 28 forks source link

Don't access AWS APIs if not needed #45

Closed jespersoderlund closed 5 years ago

jespersoderlund commented 5 years ago

The AWS EC2 APIs are not needed if you only want to use the metadata that is already available in the EC2-metadata service locally on in the instance.

You don't want to give the instances permissions to access APIs unless absolutely necessary as a large deployment can cause throttling issues and the like in the account.

Only the ${tagset_xxx} place holder seem to need access to the API.

takus commented 5 years ago

If you don't specify ${tagset_xxx}, this plugin doesn't call AWS API. https://github.com/takus/fluent-plugin-ec2-metadata/blob/14b3263712d8abd46f75ebcbc7606d3b9a4cea5c/lib/fluent/plugin/ec2_metadata.rb#L83