Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds 'additional_settings' option to configure the underlying AWS client #61

Conversation

andsel
Copy link
Contributor

@andsel andsel commented Feb 10, 2022

Release notes

Add additional_settings option to fine-grain configuration of AWS client

What does this PR do?

Introduce the option additional_settings which is a map that, once the keys are symbolized and boolean strings becomes boolean values, is passed down to the creation of AWS SQS client.

Why is it important/What is the impact to the user?

This option permit the user to fine-grain configuring the client, for example to enable debugging logs at wire level, asin:

additional_settings => {
    http_wire_trace => true
}

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • Build the gem and try a run against SQS

How to test this PR locally

  • build the gem gem build and install on a local Logstash instance
  • grab account access key and token for an AWS account
  • create an SQS
  • setup an input like:
input {
  sqs {
    queue => "<your queue name>"
    region => "<aws_region>"
    endpoint => "https://<aws_region>.amazonaws.com/<nnn>/<your queue name>"
    access_key_id => "aws_key"
    secret_access_key => "secret 1"
    role_arn => "arn:aws:iam::<nnn>:role/ElasticDeveloper"
    session_token => "secret 2" 

    additional_settings => {
      http_wire_trace => true
    }
  }
}  

Related issues

@andsel andsel changed the title Adds 'additional_settings' option for finest configuration of the und… Adds 'additional_settings' option to configure the underlying AWS client Feb 14, 2022
@andsel andsel self-assigned this Feb 14, 2022
@andsel andsel marked this pull request as ready for review February 14, 2022 10:35
Copy link
Contributor

@kares kares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

there's the same setting in S3 input and implementation wise it does the same logic of casting true/false values

CHANGELOG.md Outdated Show resolved Hide resolved
@andsel andsel merged commit 8a76ac6 into logstash-plugins:main Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Debug Logging
2 participants