I'm trying to assign an instance profile I just cr...
# aws
I'm trying to assign an instance profile I just created to a Launch Template , but I get
Copy code
error: aws:ec2/launchTemplate:LaunchTemplate resource 'my-launch-template' has a problem: iam_instance_profile.0: expected object, got string
Here's my basic code snippet
Copy code
const myInstanceRole = new ServiceRole(
        managedPolicyArns: [
        service: "<http://ec2.amazonaws.com|ec2.amazonaws.com>"

const myInstanceProfile = new aws.iam.InstanceProfile(
    { role: myInstanceRole }

const myLaunchTemplate = new aws.ec2.LaunchTemplate(
        description: `Builds the ${namePrefix} my server`,
        iamInstanceProfile: myInstanceProfile,
        imageId: amiId,
        instanceType: instanceType,
        keyName: sshKey,
        namePrefix: namePrefix,
        userData: userData,
        vpcSecurityGroupIds: availableSubnetIds,
Any ideas?
hey @salmon-ghost-86211, I believe that parameter takes an object, like this
Copy code
iamInstanceProfile: {
        arn: instanceProfile.arn
Crikey! Totally missed that. Thank you @billowy-army-68599