0

I'm using pulumi to attach an IAM Managed user policy to an IAM user, with the code snippet below.

const dynamoDbUser = new aws.iam.User(`${environment.env}-dynamo-fullaccess`, {});

new aws.iam.UserPolicyAttachment("dynamo-policy", {
        policyArn: aws.iam.AmazonDynamoDBFullAccess,
        user: dynamoDbUser.name,
    });

When I run pulumi up, I see the IAM user created in the AWS console, but there are no permissions attached. Am I missing something in order to attach the policy? The policy ARN I'm trying to attach is arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess

Victor Cui
  • 1,393
  • 2
  • 15
  • 35

1 Answers1

-1

policyArn: aws.iam.ManagedPolicies.AmazonDynamoDBFullAccess

Is the correct way to attach the policy Arn. Pulumi should really update their documentation.

Victor Cui
  • 1,393
  • 2
  • 15
  • 35