簡體   English   中英

具有啟用日志記錄功能的 cloudformation 的 AWS DMS 需要一個日志組

[英]AWS DMS with cloudformation enabling logging needs a log group

我正在使用 Cloudformation 完成所有這些工作。 我試圖為已經工作的復制任務啟用日志記錄,但我在任何地方都看不到日志,似乎應該為日志創建一個組,並且文檔中沒有類似的選項。 我在復制任務的文檔中找不到日志組的參數。 [1] [2] [3]

這是我的復制任務。

ReplicationTask:
    Type: 'AWS::DMS::ReplicationTask'
    Properties:
      SourceEndpointArn: !Ref SourceEndpoint
      TargetEndpointArn: !Ref TargetEndpoint
      ReplicationInstanceArn: !Ref ReplicationInstance
      MigrationType: 'full-load'
      TableMappings: '
      {
        "rules": [
          {
            "rule-type": "selection",
            "rule-id": "1",
            "rule-name": "1",
            "object-locator": {
              "schema-name": "%",
              "table-name": "%"
            },
            "rule-action": "include"
          }
        ]
      }'
      ReplicationTaskSettings: '
          {
              "Logging": {
                "EnableLogging": true,
                "LogComponents": [{
                    "Id": "SOURCE_UNLOAD",
                    "Severity": "LOGGER_SEVERITY_DEFAULT"
                },{
                    "Id": "SOURCE_CAPTURE",
                    "Severity": "LOGGER_SEVERITY_DEFAULT"
                },{
                    "Id": "TARGET_LOAD",
                    "Severity": "LOGGER_SEVERITY_DEFAULT"
                },{
                    "Id": "TARGET_APPLY",
                    "Severity": "LOGGER_SEVERITY_INFO"
                },{
                    "Id": "TASK_MANAGER",
                    "Severity": "LOGGER_SEVERITY_DEBUG"
                }]
              },
          }'

當我單擊復制任務時,我在日志選項卡中看到一個鏈接,該鏈接將我帶到雲監視,在那里我看到一個錯誤Log group not found

參考資料:

[1] http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-replicationtask.html

[2] http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.html

[3] http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html

您需要為用戶設置它。 這些文檔鏈接可讓您更深入地了解。

  1. https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.APIRole.html
  2. https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.IAMPermissions.html

您需要提前創建這些角色,或者在 CloudFormation 模板中創建。

編輯:似乎有時新的 AWS 控制台無法自動創建這兩個 IAM 角色。 因此,您可能需要手動創建它們。

我遇到了類似的問題,我能夠通過手動創建“dms-cloudwatch-logs-role”來解決它。 創建角色時,您必須將“AmazonDMSCloudWatchLogsRole”策略附加到代入角色。 請遵循此 AWS 故障排除信息鏈接,它非常有幫助。

https://aws.amazon.com/premiumsupport/knowledge-center/dms-cloudwatch-logs-not-appearing/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM