Skip to content
Discussion options

You must be logged in to vote

Hey @ahfx, I've managed to reproduce this.

Our CfnInstanceProfile class does have the instanceProfileName property, but it would only be set if you define that property since that's one of the input properties to the CfnInstanceProfile construct.

If you desire to return the name of the CfnInstanceProfile (which won't be set at synthesis) use cfnInstanceProfile.ref here instead. This fixed the issue for me

The way you're doing it now, the template isn't outputting anything at all for the IamInstanceProfile property, so that's why you're not running into any errors.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by indrora
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud
2 participants
Converted from issue

This discussion was converted from issue #19963 on April 19, 2022 23:17.