Views:

When you create an instance from an existing Amazon Machine Image (AMI) instance deployed with deactivated Deep Security Agent, you can add the Reset and Activation command on the Advanced Details section.

To do so, add the following command:

#!/bin/bash
sleep 60
/opt/ds_agent/dsa_control -r
/opt/ds_agent/dsa_control -a dsm://<website>:443/ "policyid:69"

Adding script in Advanced Details

Below are some notes to consider:

  • The entry "#!/bin/bash" is a must have.
  • We recommend to use "sleep 60" because Deep Security needs time to start the agent-related service when you boot on the new instance from the instance template (AMI), which is installed with Deep Security Agent core installer already.

For more information on how to run script in AWS, refer to this article: Running Commands on Your Linux Instance at Launch