Giter Club home page Giter Club logo

Comments (5)

wright831 avatar wright831 commented on August 15, 2024 2

I'll post this up as I just got it working. In the cloudwatch_logs input section you omit the access_key_id and secret_access_key parameters and instead use role_arn => "${ROLE_ARN}". But.. (key part that should have been mentioned), if you do this then you need to create a credentials file with the access_key_id and secret_access_key and place that file in the directory where Logstash is installed.. So something like /usr/share/logstash/.aws/credentials. The plugin will then reference the account you're coming from (i.e., the user tied to the credentials file) and the role_arn will reference the account your role switching into to pull logs. Oh and you'll likely need [default] at the top of your credentials file with those two parameters under it, unless you plan to reference more than one set of keys in there. Happy to see this finally working, let me know if you run into any issues.

from logstash-input-cloudwatch-logs.

maksym-iv avatar maksym-iv commented on August 15, 2024

@koursoh could you please paste what solution you've found?

from logstash-input-cloudwatch-logs.

kazizi-swe avatar kazizi-swe commented on August 15, 2024

In case you want to see the whole Logstash code:

input{
  cloudwatch_logs {
    role_arn => "${ROLE_ARN}" 
    log_group_prefix => true
    log_group => ["/aws/lambda/"]
    region => "${AWS_REGION}"
    type => "Cloudwatch"
    sincedb_path => "/usr/share/logstash/db/.sincedb*"
    start_position => 600
  }
}

The easiest / temporary solution to run it, create a docker with environment variables. Build the docker, run it, and you are good to go.

from logstash-input-cloudwatch-logs.

morganchristiansson avatar morganchristiansson commented on August 15, 2024

These AWS credentials parameters are managed by logstash-mixin-aws plugin and the parameters are identical across all plugins using this mixin. The documentation for this could be better in some plugins.

Can we close issue as it's resolved? A PR to update README would be welcome I imagine.

from logstash-input-cloudwatch-logs.

MasterBlasterLS avatar MasterBlasterLS commented on August 15, 2024

Hi,

Is it actually working? I have implemented the config provided, however arn role is not working and all requests are going to primary account.

from logstash-input-cloudwatch-logs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.