Comments (5)
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.
@koursoh could you please paste what solution you've found?
from logstash-input-cloudwatch-logs.
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.
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.
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)
- what is proxy setting if have proxy in the enviorment. HOT 2
- dependency conflict HOT 9
- Credentials issue HOT 3
- Error registering plugin after successful install HOT 1
- cloudwatch_logs no longer recognizing cloudwatch logs HOT 1
- get aws cred from IAM Roles for Service Accounts HOT 3
- Cloud watch logs are not read HOT 2
- Trying to parse RDS logs HOT 3
- not able to access cloudwatch logs from different AWS account HOT 2
- Unable to start the Logstah HOT 1
- Logging HOT 1
- Does the option "interval" works?
- Missing logs from cloudwatch HOT 2
- Shared sincedb for multiple instances HOT 1
- Logs from some of the lambda functions are not flowing through
- question: is this repo still actively maintained? HOT 1
- Log group ARN be returned
- Plugin crashes Logstash at startup on all recent versions as of this afternoon HOT 3
- Logstash 7.16.2 plugin with Opensearch 1.3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logstash-input-cloudwatch-logs.