MDAA TS Docs
    Preparing search index...

    Class InlinePolicyNamingAspect

    CDK Aspect that renames inline IAM policy names using the configured MDAA naming module. Addresses the gap where MDAA wraps Role (MdaaRole) and ManagedPolicy (MdaaManagedPolicy) but not the inline policy names that CDK creates internally via role.addToPolicy(), that MdaaCustomResource creates with a hardcoded policyName, or that MDAA hardcodes in a role's embedded Policies[] (e.g. via MdaaRole inlinePolicies).

    Activated via the @aws-mdaa/namingEnforceInlinePolicies: true CDK context key. When enabled, visits:

    • every standalone AWS::IAM::Policy, rewriting its PolicyName; and
    • every AWS::IAM::Role, rewriting each embedded Policies[].PolicyName. Both use the configured naming with the IAM_POLICY resource type. Rewriting an embedded policy name is an in-place Role update (Policies is not a replacement-requiring property), unlike a standalone AWS::IAM::Policy rename.

    Implements

    • IAspect
    Index

    Constructors

    Methods

    Constructors

    Methods