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

Enable using MLOps guidance in nested stack #210

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

athewsey
Copy link
Contributor

Issue #, if available: N/A

I'd like to be able to re-use the ml_ops solution guidance stack within other stacks: A deployable stack that provisions the dependencies, the guidance stack, and then some other resources e.g. a customised end-to-end state machine using the pre-built components.

Today, that's a challenge because the stacks don't expose any outputs. There's no config in AWS::CloudFormation::Stack to explicitly set stack name: It gets generated automatically and isn't visible via GetAtt on the resource either. So just locating resources by assumed name from the StackName isn't practical.

Description of changes:

To make building stacks that nest this guidance practical, proposing these updates:

  • Expose useful outputs from MLOps solution guidance stack, including state machine ARNs and the final AWS Stack Name.
  • Shorten role name that was causing problems when nesting the stack (64 character limit).
  • Explicitly set string types to ambiguous bool parameters (YAML interprets plain true as a bool, not string, and in one instance I got errors during CFn deployment complaining about string types).
  • Fill in a SFn description that was previously just placeholder.

Now, by nesting the solution in a parent stack something like this:

  PipelineStack:
    Type: 'AWS::CloudFormation::Stack'
    DependsOn:
      - DependencyStack
    Properties:
      Parameters:
        # DatasetIncludeRTS: true/false  - and other parameters etc.
        DatasetGroupName: forecast_e2e_demo
        SNSEndpoint: !Ref SNSEndpoint
        S3Bucket: !Ref S3Bucket
      TemplateURL: https://s3.amazonaws.com/doc-example-bucket/forecast-mlops-solution-guidance.yaml

...The parent stack can e.g. set up state machines referencing PipelineStack.Outputs.CreateDatasetGroupStateMachineArn, and use PipelineStack.Outputs.StackName if necessary.


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

Expose useful outputs from MLOps solution guidance stack to enable
nesting it inside other CloudFormation templates to trigger and chain
the workflows it creates. Shorten role name that was causing problems
when nesting the stack. Explicitly set string types to ambiguous bool
parameters (YAML interprets plain true as a bool, not string, and in
one instance I got errors during CFn deployment complaining about
string types). Fill in a placeholder SFn description.
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