diff --git a/metaflow/cli.py b/metaflow/cli.py index 9af2678fd1c..e732b43d339 100644 --- a/metaflow/cli.py +++ b/metaflow/cli.py @@ -504,8 +504,13 @@ def step( default=None, help="Tags for this instance of the step.", ) +@click.option( + "--aws-tags", + multiple=True, + default=None, + help="AWS tags.") @click.pass_obj -def init(obj, run_id=None, task_id=None, tags=None, **kwargs): +def init(obj, run_id=None, task_id=None, tags=None, aws_tags=None, **kwargs): # init is a separate command instead of an option in 'step' # since we need to capture user-specified parameters with # @add_custom_parameters. Adding custom parameters to 'step' @@ -515,6 +520,7 @@ def init(obj, run_id=None, task_id=None, tags=None, **kwargs): # variables. obj.metadata.add_sticky_tags(tags=tags) + obj.metadata.add_sticky_tags(tags=aws_tags) runtime = NativeRuntime( obj.flow, diff --git a/metaflow/plugins/aws/step_functions/step_functions.py b/metaflow/plugins/aws/step_functions/step_functions.py index 4ec005cf7e2..814f719f2ce 100644 --- a/metaflow/plugins/aws/step_functions/step_functions.py +++ b/metaflow/plugins/aws/step_functions/step_functions.py @@ -983,7 +983,7 @@ def _step_cli(self, node, paths, code_package_url, user_code_retries): if self.tags: step.extend("--tag %s" % tag for tag in self.tags) if self.aws_tags: - step.extend("--aws-tag %s" % aws_tag for aws_tag in self.aws_tags) + step.extend("--aws-tags %s" % aws_tag for aws_tag in self.aws_tags) if self.namespace is not None: step.append("--namespace=%s" % self.namespace) cmds.append(" ".join(entrypoint + top_level + step))