Hi, I would like to get the value of ApproverDecisions.Comment from aws:approve to use as input to the next step. Is there any specific syntax on this?
ApproverDecisions
{
"Approver": "xxx",
"Decision": "Approve",
"ApprovalDecisionTime": "2022-04-06T07:22:51.034463Z",
"Comment": "Approve because it is valid"
}
I have tried the following but not working
mainSteps:
- name: ReviewImage
action: 'aws:approve'
inputs:
NotificationArn: 'XXX'
Message: 'Notification Hello'
MinRequiredApprovals: 1
Approvers:
- 'XXXX'
outputs:
- Name: CommentVal
Selector: $.ApprovalDecisions[0].Comment
Type: String
- Name: CommentVal2
Selector: $.ApprovalDecisions.Comment
Type: String
- name: TestLogging
action: 'aws:runCommand'
inputs:
DocumentName: AWS-RunPowerShellScript
InstanceIds:
- XXXXX
Parameters:
commands:
- ' $comment = {{ ReviewImage.CommentVal }} '
- ' Write-Host "$comment" '
- ' $comment2 = {{ ReviewImage.CommentVal2 }} '
- ' Write-Host "$comment2" '