0

I have a StringList parameter in a Runbook, and I want to assign it to a variable of type String. What is the best way to do this? I have tried many ways from the web, but all have failed. My problem is that in the SNS notification, the instanceIds do not come up; just the variable name gets printed.

In SNS Notifiation it looks like: Message from requester: Stopping instance(s): {{ instanceId | join(', ') }}

I expect it to show the value of the parameter: Stopping instance(s): i-0d7193149e634d705

schemaVersion: '0.3' description: Stops EC2 instance on approval assumeRole: arn:aws:iam::123456789:role/ssm-document-role parameters: instanceId: type: StringList description: The ID of the EC2 instance to stop ApproverSnsTopicArn: type: String description: Notification SNS ARN default: arn:aws:sns:us-east-1:123456789:automation-approval-topic Message: type: String description: Message for Approver Approver: type: String description: Approver ARN default: arn:aws:iam::123456789:user/ssm-approver mainSteps: - name: Approve action: aws:approve nextStep: ChangeInstanceState isEnd: false inputs: NotificationArn: '{{ ApproverSnsTopicArn }}' Message: 'Stopping instance(s): {{ instanceId | join(', ') }}' Approvers: - arn:aws:iam::123456789:user/ssm-approver - name: ChangeInstanceState action: aws:changeInstanceState isEnd: true inputs: DesiredState: stopped InstanceIds: '{{ instanceId }}' 

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.