mirror of https://github.com/grafana/loki
lambda-promtail: Support AWS Organization CloudTrail (#10147)
**What this PR does / why we need it**:
The S3 object key for Organization CloudTrail events includes the org's
ID at the beginning. Currently, trying to ingest Organization CloudTrail
events with lambda-promtail fails due to the object key not matching the
regex. This PR adds support for both matching and parsing out that org
ID.
**Which issue(s) this PR fixes**:
Fixes #<issue number>
**Special notes for your reviewer**:
- instead of adding a new regex I just amended the existing regex just
to avoid too heavy of a refactor
- I also threw in error logging on the handler because that was
_invaluable_ debugging why lambda-promtail wasn't working in our
environment. I figure others might get some benefit from it.
**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [x] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/setup/upgrade/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](d10549e3ec)
pull/10165/head
parent
1221658fc5
commit
8998539981
Loading…
Reference in new issue