如何设置aws数据管道中多个s3存储桶的先决条件?

问题描述:

如何在数据管道中设置先决条件,以便检查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'> 

任何意见赞赏, 谢谢

如果有人无法弄清楚。

代码被公布在AWS论坛:

https://forums.aws.amazon.com/thread.jspa?threadID=266162