in src/tasks/CodeDeployDeployApplication/TaskOperations.ts [59:99]
private async verifyResourcesExist(): Promise<void> {
try {
await this.codeDeployClient
.getApplication({ applicationName: this.taskParameters.applicationName })
.promise()
} catch (err) {
throw new Error(tl.loc('ApplicationDoesNotExist', this.taskParameters.applicationName))
}
try {
await this.codeDeployClient
.getDeploymentGroup({
applicationName: this.taskParameters.applicationName,
deploymentGroupName: this.taskParameters.deploymentGroupName
})
.promise()
} catch (err) {
throw new Error(
tl.loc(
'DeploymentGroupDoesNotExist',
this.taskParameters.deploymentGroupName,
this.taskParameters.applicationName
)
)
}
if (this.taskParameters.deploymentRevisionSource === revisionSourceFromS3) {
try {
await this.s3Client
.headObject({
Bucket: this.taskParameters.bucketName,
Key: this.taskParameters.bundleKey
})
.promise()
} catch (err) {
throw new Error(
tl.loc('RevisionBundleDoesNotExist', this.taskParameters.bundleKey, this.taskParameters.bucketName)
)
}
}
}