Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding suffix to resource names, so that resource creation does not fail #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ajaydhungel7
Copy link

While running both the templates. I encountered an error due to the resource names being the same.

So, I added the stack name as the suffix on the following resources causing problem

Old names:

RoleName: 'SSMforEC2'
InstanceProfileName: 'SSMforEC2InstanceProfile'

new names:

RoleName: !Sub SSMforEC2-${AWS::StackName}
InstanceProfileName: !Sub SSMforEC2InstanceProfile-${AWS::StackName}

what was SSMforEC2 will now be SSMforEC2-openvino / SSMforEC2-opea

CloudFormation stack names do not allow characters that are disallowed in IAM role names (e.g., /, *, spaces), using AWS::StackName as a suffix in an IAM role name will not cause issues related to invalid characters

Added the AWS:StackName as suffix to the name of role and ec2 instance profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant