Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Incorrect type for FieldIndexPolicies in CloudWatch Logs

Closed Beginner friendly
#2,367 3 comments 0 reactions 0 assignees View on GitHub

@markpeek is already working on this.

Since Sep 28, 2026.

  • #2368 by @markpeek — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
aws, python
Domain
cloud

Research direction

Start at the troposphere.logs.LogGroup definition and inspect the declared type for FieldIndexPolicies. Compare it with the AWS CloudFormation example in the issue, then verify that passing a list containing a Fields entry no longer raises the reported type error.

Written by the indexing model from the issue text.

Description

LogGroup defines FieldIndexPolicies as an optional Tags, this is incorrect. The CloudFormation documentation contains the correct type:

"TestFieldIndexingLogGroup": {
    "Type": "AWS::Logs::LogGroup", 
    "Properties": {
        "LogGroupName": "my-log-group",
        "FieldIndexPolicies": [{
            "Fields": [
                "RequestId",
                "TransactionId"
            ]
        }]
    }
}   

However, attempting to create a LogGroup in troposphere of the expected type results in an error:

log_group = t.add_resource(
    LogGroup(
        "OrganisationCloudTrailLogGroup",
        RetentionInDays=365,
        FieldIndexPolicies=[{
            "Fields": [
                "readOnly"
            ]
        }]
    )
)
TypeError: <class 'troposphere.logs.LogGroup'>: OrganisationCloudTrailLogGroup.FieldIndexPolicies is <class 'list'>, expected <class 'troposphere.Tags'>
Dominant language
Python
Stars
4.9k
Forks
1.4k
Avg merge
10d 1h
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudtools/troposphere

All issues in cloudtools/troposphere

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.