AWS Announces the General Availability of AWS CloudFormation Hooks
aws.amazon.com
aws.amazon.com
I do agree that it's a pity that Sentinel isn't free.
[1]: https://docs.hashicorp.com/sentinel/downloads [2]: https://docs.hashicorp.com/sentinel/intro/getting-started/ru... [3]: https://github.com/hashicorp/terraform-foundational-policies... [4]: https://github.com/hashicorp/terraform-guides/tree/master/go... [5]: https://github.com/hashicorp/terraform-guides/tree/master/go... [6]: https://github.com/hashicorp/terraform-guides/tree/master/go... [7]: https://github.com/hashicorp/sentinel-sdk [8]: https://docs.hashicorp.com/sentinel/commands/apply
[1]: https://www.hashicorp.com/blog/announcing-hashicorp-sentinel...
You can even build a script to run it, check the errors, update IAM, and then run it again.
Eventually you'll have a set of IAM least privilege rules. It's a pain but it's secure.
The pain I'm dealing with is having to look at the event logs to determine which CF task failed due to permission, then add that to the CF policy.
First result in Google gift “generate IAM policies from usage”
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_poli...
Those dont really provide for generic “pre” hooks as they fundamentally represent changes. Getting arbitrary customer logic in to the API call chain has a lot of scary implications for fault isolation, timing, resource use, etc. In my opinion it would also provide very very sharp edges for users to cut themselves on. And, of course, getting consistent behavior and coverage across the ~300 existing AWS services is a pretty big implementation challenge.
Disclaimer: Principal at AWS, but no inside knowledge of the Cloudformation changes or mentioned services.