diff --git a/lib/fluent/plugin/out_opensearch.rb b/lib/fluent/plugin/out_opensearch.rb index 7fd543c..0c03f69 100644 --- a/lib/fluent/plugin/out_opensearch.rb +++ b/lib/fluent/plugin/out_opensearch.rb @@ -350,7 +350,11 @@ class << self @credential_mutex.synchronize do @_os = nil - @_aws_credentials = aws_credentials(@endpoint) + begin + @_aws_credentials = aws_credentials(@endpoint) + rescue => e + log.error("Failed to get new AWS credentials: #{e}") + end end end end