Skip to content

aws_logs.DataProtectionPolicy: policy keywords start with lower case and that's why are not visible under aws web console #33408

@piotrkandziora

Description

@piotrkandziora

Describe the bug

Policy created by aws cdk is not visible under "Log group custom data identifier" section. When I modify the policy manually on web console so that every keyword starts with upper case then it becomes visible.

Below code I use to create a log group with data protenction policy enabled:

        data_protection_policy = aws_logs.DataProtectionPolicy(
            name="data_protection_policy",
            identifiers=[
                aws_logs.CustomDataIdentifier(
                    "A",
                    '"A*",
                ),
                aws_logs.CustomDataIdentifier(
                    "B",
                    '"B*,
                ),
                aws_logs.CustomDataIdentifier(
                    "C",
                    '"C*',
                ),
            ],
        )
        log_group = aws_logs.LogGroup(
            self,
            "somegroupname",
            log_group_name=_resource_suffix,
            retention=retention,
            data_protection_policy=data_protection_policy,
        )

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

Policy should be visible on the web console.

Current Behavior

Policy is not visible on the web console.

Reproduction Steps

See description.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.167.1

Framework Version

No response

Node.js Version

20.13.1

OS

Ubuntu

Language

Python

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-logsRelated to Amazon CloudWatch LogsbugThis issue is a bug.effort/smallSmall work item – less than a day of effortp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions