question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Encountered unsupported property PolicyName

See original GitHub issue

So, I have created below Aspect to replace all the created Inline policy to Managed policy

export class modifyInlinePolicy implements cdk.IAspect {
  constructor() {}

  public visit(node: cdk.IConstruct): void {
    if (!(node instanceof iam.Policy)) {
      return;
    }
    const policyresource =  node.node.findChild('Resource') as iam.CfnPolicy;

    if (policyresource === undefined) {
      return;
    }
 
 
 policyresource.addOverride("Type","AWS::IAM::ManagedPolicy");


    }
}

And then applied this aspect to my stack root.node.applyAspect(new modifyInlinePolicy());

Reproduction Steps

Error Log

Environment

  • CLI Version : 1.12
  • Framework Version: 1.12
  • OS : Ubuntu
  • Language : Typescript

Other


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nikhilbhojcommented, Oct 14, 2019

I was able to solve this issue by adding other missing properties filed.

Namely Path, description

0reactions
nikhilbhojcommented, Oct 13, 2019

If you want I can paste the whole template files, both with or without Escape Hatchet and applied one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to name a custom managed policy created using ...
Currently is not possible to set a custom name for a IAM managed policy when creating it via CloudFormation. The same applies to...
Read more >
AWS::IAM::ManagedPolicy - AWS CloudFormation
Creates a new managed policy for your AWS account. This operation creates a policy version with a version identifier of v1 and sets...
Read more >
Encountered unsupported property UpdatePolicy on ...
I'm getting "Encountered unsupported property UpdatePolicy" on AWS::ElastiCache::ReplicationGroup. According to https://docs.aws.amazon.com/AWSCloudFormation/ ...
Read more >
Encountered unsupported property - Seed.run
This error happens when the resources defined in your serverless.yml has attributes not supported by CloudFormation. Or the resource attributes exported in ...
Read more >
Firehose Deployment Contradiction; RoleARN cannot be empty
... RoleARN cannot be empty; Encountered unsupported Property RoleARN ... sts:AssumeRole Policies: - PolicyName: ${self:service}-fhdelegate ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found