awslabs / aws-media-insights

This is an application for analyzing the content of images and videos. It includes a GUI and back-end analytical workflows. It is the reference application for the Media Insights Engine.
31 stars 12 forks source link

Support multi deploys in the same region #22

Closed ianwow closed 3 years ago

ianwow commented 3 years ago

Issue #, if available:

21

Description of changes:

see commit log

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ianwow commented 3 years ago

This PR does effectively allow users to deploy more than one front-end Media Insights instance using the same MIE instance, however I closed this PR without merging because I could not justify the extra code complexity it introduces and I wasn't sure that users really benefited by being able to deploy more than one MI instance against a single MIE instance.

ianwow commented 3 years ago

What I didn't realize at the time, however, was that users may want to deploy more than one all-in-one stack (MIE + MI) in a single region. This PR is needed in order to achieve that, and I can clearly see why users might want that. So, I'm reopening this PR.

ianwow commented 3 years ago

For the release notes:

Users can now deploy the Media Insights (MI) demo app multiple times in the same region. Specifically:

  1. Users can deploy multiple MI stacks over a single MIE instance in the same region.
  2. Users can also deploy multiple MI stacks, each with their own MIE instance, in the same region.

Details:

When deploying over an existing MIE stack, then the MI application stack is nested under a Uuid stack. This is necessary in order to avoid name conflicts for Step Function resources that are part of the workflows defined by the Media Insights application.

When deploying the Media Insights application with a new MIE stack, then the MI app stack is NOT nested under a UUID stack. The UUID is not necessary in this case since the MIE stack is new and therefore void of any potentially conflicting Step Function resources. Furthermore, nesting a new MIE stack under a UUID stack will cause Cloud Formation errors because MIE functions will have names that are too long (e.g. mie03fweb-Uuid-JE4B3ODPSGN5-MieStack-5OF63Z6LK53I-start-wait-operation). Those names must be less than 64 characters.

ianwow commented 3 years ago

I'm merging this without another code review, since I've already talked about this with Brandon.