- Newest
- Most votes
- Most comments
Hello.
As described in the following document, depending on the IAM policy you use, you may need to include "service-role/" or "job-function/" in the name.
https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_iam/ManagedPolicy.html
Import a managed policy from one of the policies that AWS manages.
For this managed policy, you only need to know the name to be able to use it.
Some managed policy names start with “service-role/”, some start with “job-function/”, and some don’t start with anything. Include the prefix when constructing this object.
In this case, the IAM policy ARN contains "service-role/", so please set it with "service-role/" in the name.
https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSCodeDeployRole.html
ARN: arn:aws:iam::aws:policy/service-role/AWSCodeDeployRole
Please try it as follows:
iam.ManagedPolicy.from_aws_managed_policy_name(
"service-role/AWSCodeDeployRole"
),
Relevant content
asked 8 months ago
asked 2 years ago
asked 4 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago
