How to use keyed_groups in constructed EC2 inventory with a single tag?

Currently inventory.aws_ec2.yaml looks like this:

`
plugin: aws_ec2
regions:

  • us-west-2
    keyed_groups:
  • prefix: tag
    key: tags

`

This creates one group for every tag combination. How can make it look at a single tag only? For example if only wanted it to create one group for each value of the “Environment” tag.

keyed_groups:

  • key: tags.Environment
    separator: ‘’
    prefix: env # This is optional