Skip to content

Allow passing an IAM Instance Profile to ec2.Instance #8348

@sagiba

Description

@sagiba

Currently ec2.Instance is creating the IamProfile internally, it isn't possible to inject a pre-constructed one. It is possible to inject the a role, but when re-using the same role for several instances, a separate instance profile is being created for each of them.

const iamProfile = new iam.CfnInstanceProfile(this, 'InstanceProfile', {

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-ec2Related to Amazon Elastic Compute Cloudeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions