Skip to content

feat(aws_cloudwatch_logs sink): allow setting the log class#25448

Open
vivshaw wants to merge 1 commit into
vectordotdev:masterfrom
vivshaw:vivshaw/cloudwatch-logs-group-class
Open

feat(aws_cloudwatch_logs sink): allow setting the log class#25448
vivshaw wants to merge 1 commit into
vectordotdev:masterfrom
vivshaw:vivshaw/cloudwatch-logs-group-class

Conversation

@vivshaw
Copy link
Copy Markdown

@vivshaw vivshaw commented May 16, 2026

Summary

as captured in #22008, it's not currently possible to set the log group used by create_missing_group. this means it always defaults to Standard, and one cannot select Infrequent Access. a prior attempt was made in #22031, but later abandoned. this PR revives that attempt. effectively the same approach is used, only minor tweaks here.

change is backwards-compatible, all existing uses should default to STANDARD just like they already do.

Vector configuration

config should look a little somethin' like this:

sources:
  demo:
    type: demo_logs
    format: json

sinks:
  cw:
    type: aws_cloudwatch_logs
    inputs: [demo]
    region: us-east-1
    group_name: "vector-ia-demo"
    stream_name: "{{ host }}"
    encoding:
      codec: json
    create_missing_group: true
    group_class: INFREQUENT_ACCESS

How did you test this PR?

cargo fmt
make check-clippy
cargo build
cargo test
make test-integration-aws
make generate-docs

lemme know if i missed anything!

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

@vivshaw vivshaw requested review from a team as code owners May 16, 2026 06:36
@github-actions github-actions Bot added docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. domain: sinks Anything related to the Vector's sinks domain: external docs Anything related to Vector's external, public documentation labels May 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 16, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@vivshaw
Copy link
Copy Markdown
Author

vivshaw commented May 16, 2026

I have read the CLA Document and I hereby sign the CLA

/// [log_class]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html
#[configurable_component]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

did this to match how y'all are handling S3 storage classes, which you have as SCREAMING_SNAKE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs review on hold The documentation team reviews PRs only after a PR is approved by the COSE team. domain: external docs Anything related to Vector's external, public documentation domain: sinks Anything related to the Vector's sinks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS CloudWatch Logs - create infrequent access type with create_missing_group

1 participant