微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 SAM 模板中添加 AWS Glue 作业和爬网程序后未添加/更新标签

如何解决在 SAM 模板中添加 AWS Glue 作业和爬网程序后未添加/更新标签

MainglueJob:
    Type: AWS::glue::Job
    Properties:
      Name: !Ref glueJobName
      Role: !Ref glueResourcesServiceRoleName
      Description: Job created with CloudFormation.
      glueVersion: 2.0
      Command:
        Name: glueetl
        PythonVersion: 3
        ScriptLocation: !Ref JobScriptLocation
      AllocatedCapacity: 3
      ExecutionProperty:
        MaxConcurrentRuns: 1
      DefaultArguments:
        --job-bookmark-option: job-bookmark-enable
        --enable-continuous-cloudwatch-log: true
        --enable-metrics: true
        --enable-s3-parquet-optimized-committer: true
        --TempDir: 's3://aws-glue-temporary-123-ap-south-1/dir'
      Tags: {
        "tag:Key1": "Value1","tag:Key2": "Value2"
      }

  MainCrawler:
    Type: AWS::glue::Crawler
    Properties:
      Name: Main
      Role: !Ref glueResourcesServiceRoleName
      Description: AWS glue crawler
      DatabaseName: !Ref DatabaseName
      Targets:
        S3Targets:
          - Path: !Ref S3Path
      SchemaChangePolicy:
        UpdateBehavior: "UPDATE_IN_DATABASE"
        DeleteBehavior: "LOG"
      Configuration: '{"Version":1.0,"CrawlerOutput":{"Partitions":{"AddOrUpdateBehavior":"InheritFromTable"},"Tables":{"AddOrUpdateBehavior":"MergeNewColumns"}}}'
      Tags: {
        "tag:Key1": "Value1","tag:Key2": "Value2"
      }

尝试在 SAM 模板中为粘合作业定义标签,但未在粘合作业或爬虫中更新

Tags: {
    "tagKeyName1": "tagValue1","tagKeyName2": "tagValue2","tagKeyName3": "tagValue3"
  }

我只能使用标签更新胶水资源,因为胶水作业已在使用中。 由于用户无法控制 glue 作业书签,因此删除和重新创建堆栈将花费我们很多钱。

我正在使用 SAM 模板并尝试向 glue Job 和 Crawler 添加标签

无论如何要更新带有标签的资源?

在 SAM 模板中为 glue 资源声明标签的正确格式是什么?

有人愿意帮忙吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。