Hi - How do I attach an IAM `policyAttachment` to ...
# general
a
Hi - How do I attach an IAM
policyAttachment
to an EC2 instance? I have a policyAttacement as documented:
Copy code
const test_attach = new aws.iam.RolePolicyAttachment("test-attach", {
    role: role.name,
    policyArn: policy.arn,
});
and an
aws.ec2.Instance
What is the correct way to attach them together?
b
Instance Profile
a
Hmm. From the docs it isn't obvious how that is supposed to work. How do they connect? https://www.pulumi.com/registry/packages/aws/api-docs/iam/instanceprofile/
• create a policy • attach that policy to a role via rolepolicyattachment • then attach the role to an instance profile as above
a
Ok thanks, makes sense