retail-demo-store icon indicating copy to clipboard operation
retail-demo-store copied to clipboard

Please name related created resources uniquely

Open deathweaselx86 opened this issue 5 years ago • 11 comments

Someone at my org deployed this, but didn't tear it down. Late, a different person attempted to deploy this but it failed because RetailDemoStore-users-TaskRole already exists. I would expect all of these resources to be named uniquely. Can we make that happen?

deathweaselx86 avatar Jul 23 '20 16:07 deathweaselx86

Thanks, @deathweaselx86. Most resources are uniquely named during deployment but some have fixed names since they are accessed by name in code in the workshop notebooks. Making all resources uniquely named would require the notebooks to resolve these names. We need to find an elegant approach to this that does not add confusing complexity to the notebooks. You're right, though, that we need to figure this out. As for the TaskRole's, we should be able to use dynamic names for those.

james-jory avatar Jul 28 '20 14:07 james-jory

We will work on this issue in phases where the goal of the first phase will be to support multiple deployments in a single account but just in different regions. Some research and testing needs to be done to verify but this should just involve making sure that IAM resources are uniquely named. This includes IAM roles in the CloudFormation templates and roles created in notebooks (such as the 1.1-Personalize workshop). All other services should be regional or already use dynamic names.

The second phase will tackle using dynamic names throughout the project so that multiple deployments in the same account and same region will be supported.

james-jory avatar Aug 11 '20 13:08 james-jory

Pull request #65 will provide a support for deployment in a multiple regions. Multiple deployment in a same region will come later.

patrick-239 avatar Aug 22 '20 13:08 patrick-239

Hi @patrick-239 and @james-jory Multi-region deployment is still not available since IAM roles are still being used. I just tried it and reveived the following error:

RetailDemoStore-orders-TaskRole already exists

Are there any plans/next steps remaining for multi-region deployment

alexchirayath avatar Aug 28 '20 07:08 alexchirayath

How did you launch a stack (via button on GitHub page)?

patrick-239 avatar Aug 28 '20 08:08 patrick-239

@patrick-239 I am trying to deploy it in the "Deploy for Development" mode but I am staging the resources and template in my own s3 buckets using the stage.sh script. However, I believe this would be an issue in all modes of deployment. The issue is due to hard coding in resource names like roles as seen here and since IAM roles are account-level resources , any userdeploying in multiple regions could face this error

alexchirayath avatar Aug 28 '20 16:08 alexchirayath

@alexchirayath Are you sure you're using the latest templates? The merged changes no longer name task roles using the format you noted in your error above. They are named with a prefix of the stack name + region. This will ensure that role names are unique across the account for multiple deployments (albeit in separate regions).

james-jory avatar Aug 28 '20 18:08 james-jory

Thanks for the quick follow up. It seems I didnt have all the changes merged it. My apologies. Running the updated branch now, will report back if i see any errors

alexchirayath avatar Aug 28 '20 18:08 alexchirayath

@alexchirayath soon we will release an another update (pull request already created) and it will be possible to deploy several demos in a same region.

patrick-239 avatar Aug 28 '20 19:08 patrick-239

@alexchirayath soon we will release an another update (pull request already created) and it will be possible to deploy several demos in a same region.

Hi @patrick-239 : Just following up on this issue. I remember the PR being closed due to some macro name limitations. Are we still on track to support multiple deployments in the same region, same account?

alexchirayath avatar Sep 16 '20 17:09 alexchirayath

@alexchirayath I thought support for deployments in separate regions in the same account would satisfy your requirements. Has that changed?

james-jory avatar Sep 18 '20 21:09 james-jory

closing as stack supports deployment in multi-region is good enough seperation.

BastLeblanc avatar Feb 01 '24 20:02 BastLeblanc