Loop through object attributes in a single resource?

A post was split to a new topic: Select three most recent AMI IDs