This activity needs to be executed on one node of the cluster. It's typically the first node.
Creation of a STONITH Resource in the Command Line Interface
Create a file with the following content:
primitive res_AWS_STONITH stonith:external/ec2 \ op start interval=0 timeout=180 \ op stop interval=0 timeout=180 \ op monitor interval=30 timeout=30 \ meta target-role=Started \ params tag=pacemaker profile=cluster
The "tag=pacemaker" entry needs to match the tag chosen for the EC2 instances. The value for this tag will contain the host name.
Add this file to the configuration. The following command has to be issued as super user. It uses the file name aws-stoneith.txt:
crm configure load update aws-stoneith.txt