Logstash with Localstack

Hi, I have a project with a pipeline who get input from a SQS and output to ES. In order to test the pipeline I was trying to start a localstack (https://github.com/localstack/localstack) container to provide sqs service, a logstash container and a ES container. Inside logstash container I can list queues and post message via awscli, but when start the logstash get the following error:

Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
[2019-04-29T18:17:11,177][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"6.6.1"}
[2019-04-29T18:17:34,236][INFO ][logstash.pipeline        ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>6, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2019-04-29T18:17:34,352][INFO ][logstash.inputs.sqs      ] Registering SQS input {:queue=>"http://sqs:4576/queue/atlas-fallback"}
[2019-04-29T18:17:37,901][ERROR][logstash.inputs.sqs      ] Cannot establish connection to Amazon SQS {:error=>#<Aws::SQS::Errors::InvalidClientTokenId: The security token included in the request is invalid.>}
[2019-04-29T18:17:37,923][ERROR][logstash.pipeline        ] Error registering plugin {:pipeline_id=>"main", :plugin=>"<LogStash::Inputs::SQS queue=>\"http://sqs:4576/queue/atlas-fallback\", id=>\"fallback\", enable_metric=>true, codec=><LogStash::Codecs::JSON id=>\"json_1286c4f2-1d13-4176-9edc-b6cb1532ac08\", enable_metric=>true, charset=>\"UTF-8\">, threads=>1, region=>\"us-east-1\", role_session_name=>\"logstash\", polling_frequency=>20>", :error=>"Verify the SQS queue name and your credentials", :thread=>"#<Thread:0x3c2d5799 run>"}
[2019-04-29T18:17:38,007][ERROR][logstash.pipeline        ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<LogStash::ConfigurationError: Verify the SQS queue name and your credentials>, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-sqs-3.1.2/lib/logstash/inputs/sqs.rb:113:in `setup_queue'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-sqs-3.1.2/lib/logstash/inputs/sqs.rb:104:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:259:in `register_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:270:in `block in register_plugins'", "org/jruby/RubyArray.java:1734:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:270:in `register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:413:in `start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:311:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:217:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:176:in `block in start'"], :thread=>"#<Thread:0x3c2d5799 run>"}
[2019-04-29T18:17:38,037][ERROR][logstash.agent           ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
[2019-04-29T18:17:38,540][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}```

Anyone have any issue trying to execute this kind of stack/test?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.