Skip to content

Conversation

@jjbainAWS
Copy link
Contributor

TASK: As a VAMS customer I would like to define a pipeline to use a lambda function or ECR container image that is already in my account. I want to avoid deploying templates just to copy and paste my code anyways.

An additional optional field as been created in the create pipeline form and if an ECR image URI or lambda function name is provided, the API sends it over to createPipeline.py which updates the dynamo database with a new userProvidedResource attribute.
If this userProvidedResource is provided, then deployment of the SageMaker CFN template or lambda function is skipped.

In WorkflowPipelineSelector.js, the selector is configured to send the userProvidedResource field from the dynamo table item to the createWorkflow.py lambda function.
In createWorkflow.py if the userProvidedID is present, it is used to configure the steps in the state machine accordingly.

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

Copy link
Contributor

@archieco archieco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjbainAWS nice work here! I just a few questions and a couple small requests.

delete_stack(item['pipelineId'])
else: #Lambda Pipeline
delete_lambda(item['pipelineId'])
if item['userProvidedResource'] == "Not Provided":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under what circumstances would userProvidedResource be "Not Provided" but it's not something we want to delete? Can you think of any scenarios where this would accidentally delete customer applications?

)

#If a lambda function name or ECR container URI was provided by the user, creation is not necessary
if userResource != "Not Provided":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a constant for "Not Provided" so that it's easier to keep track of references in the future?

…an object instead of a string, also added a check for pipeline deletion and workflow creation for pipelines that do not have a userProvidedResource attribute in their dynamodb entry
…e instead of the string. Also using null instead of null json.loads converts this to a None type in Python.
@ravij3 ravij3 merged commit deebd8d into main Mar 9, 2023
scheurik pushed a commit that referenced this pull request Jun 14, 2024
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.

3 participants