Closed jkopacze closed 6 years ago
Double check your key/secret. I believe errors in those (possible extra whitespace, or missing characters) are the usual culprit for this error.
Not 100% sure, but possibly the date being very off on your host machine could cause this as well.
Right, so obvious. Of course it fixed the error ;) Thanks Luke!
Happy to help!
For some reason I cannot authenticate using inline access_key_id and secret_access_key and get error like below:
[2018-04-30T11:39:36,964][ERROR][logstash.pipeline ] A plugin had an unrecoverable error. Will restart this plugin. Pipeline_id:main Plugin: <LogStash::Inputs::CloudWatch_Logs log_group=>["/aws/lambda/xxxxxxxxx"], log_group_prefix=>true, access_key_id=>"Axxxx", secret_access_key=><password>, region=>"us-east-1", type=>"lambda", id=>"3a9eca949288562397c794252c12cf269461c5c5286f0af4a007fe352ce8ea78", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_47402051-7611-4745-9383-8098c39648c1", enable_metric=>true, charset=>"UTF-8">, role_session_name=>"logstash", interval=>60, start_position=>"beginning"> Error: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. Exception: Aws::CloudWatchLogs::Errors::InvalidSignatureException Stack: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/aws-sdk-core-2.11.32/lib/seahorse/client/plugins/raise_response_errors.rb:15:in
call' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/aws-sdk-core-2.11.32/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:incall' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/aws-sdk-core-2.11.32/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in
call' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/aws-sdk-core-2.11.32/lib/aws-sdk-core/plugins/param_converter.rb:20:incall' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/aws-sdk-core-2.11.32/lib/aws-sdk-core/plugins/response_paging.rb:26:in
call' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/aws-sdk-core-2.11.32/lib/seahorse/client/plugins/response_target.rb:21:incall' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/aws-sdk-core-2.11.32/lib/seahorse/client/request.rb:70:in
send_request' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/aws-sdk-core-2.11.32/lib/seahorse/client/base.rb:207:inblock in describe_log_groups' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-cloudwatch_logs-1.0.2/lib/logstash/inputs/cloudwatch_logs.rb:141:in
block in find_log_groups' org/jruby/RubyKernel.java:1292:inloop' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-cloudwatch_logs-1.0.2/lib/logstash/inputs/cloudwatch_logs.rb:140:in
block in find_log_groups' org/jruby/RubyArray.java:1734:ineach' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-cloudwatch_logs-1.0.2/lib/logstash/inputs/cloudwatch_logs.rb:139:in
find_log_groups' /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-cloudwatch_logs-1.0.2/lib/logstash/inputs/cloudwatch_logs.rb:115:inrun' /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:514:in
inputworker' `My input conf:
cloudwatch_logs { log_group => "/aws/lambda/xxxx" log_group_prefix => "true" access_key_id => "A....." secret_access_key => "Sxxxxxx...." region => "us-east-1" type => "lambda" }
Any ideas ?