2017-10-10 38 views
0

如何在數據管道中設置先決條件,以便檢查s3存儲桶是否存在,如果不存在則失敗?我可以輕鬆設置1桶,但我不知道如何更新管道檢查多個S3鍵。如何設置aws數據管道中多個s3存儲桶的先決條件?

這是我到目前爲止有:

{ 
    "objects": [ 
... 
    { 
     "stage": "true", 
     "name": "ShellCommandActivityObj", 
     "id": "ShellCommandActivityObj", 
     "scriptArgument": [ 
     "#{myEfsSource}", 
     "#{myInterval}", 
     "#{myRetainedBackups}", 
     "#{myEfsID}" 
     ], 
     "runsOn": { 
     "ref": "EC2ResourceObj" 
     }, 
     "type": "ShellCommandActivity", 
     "command": "#{myShellCmd}", 
     "onSuccess": { 
     "ref": "Notify_on_success" 
     }, 
     "onFail": { 
     "ref": "Notify_on_Failure" 
     }, 
     "precondition": { 
     "ref": "DestinationBucketStatus", 
     "ref": "BucketWithScriptStatus" 
     } 
    } 
    .... 
} 

我試着在先決條件使用名單,但後來我得到以下錯誤:

Invalid type for parameter pipelineObjects[4].fields[3].refValue, value: [u'DestinationBucketStatus', u'BucketWithScriptStatus'], type: <type 'list'>, valid types: <type 'basestring'> 

任何意見讚賞, 謝謝

回答