Topics on this page
Manually enabling HA Lambda
To minimize packet loss during an appliance upgrade, you must make sure that the appliance is out-of-line by enabling the High Availability Lambda function manually. Manually invoking HA Lambda is only possible if you are using AWS Edge deployment. Follow the steps below to manually take the appliance offline for Upgrade:
- Disable your Cloud Watch Alarms:
- Ensure you have the right credential to run AWS CLI (aws-adfs login first, if necessary)
- Run this command:
aws cloudwatch disable-alarm-actions --alarm-names "CloudWatch Alarm Name”
-
Verify that the "ActionsEnabled" field is false:
aws cloudwatch describe-alarms --alarm-names "CloudWatch Alarm Name" | grep "ActionsEnabled"
-
Manually invoke HA Lambda to modify routes to bypass the appliance.
Method 1: Via AWS Management Console
-
Navigate to the AWS Lambda Functions page, and click on your HALambdaFunction to see function details.
-
Click the orange TEST button under the Code source section to configure a test event.
-
Select > Create new test event. The event template chosen, does not matter.
-
Name the event "HALambdaInvoke".
-
Delete the original template code, and paste the following code:
{ "Records": [ { "Sns": { "Message": "{\"NewStateValue\": \"ALARM\",\"Trigger\": {\"Dimensions\": [{\"value\": \"i-0000000000000000\",\"name\": \"InstanceId\"}]}}" } } ] }
-
Replace "i-0000000000000000" with your appliance instance id.
-
Click on the orange TEST button to run the Lambda function.
-
The log for the function can be found in the corresponding AWS CloudWatch log group. (Log group name should be the same as the Lambda function name.)
NOTE
To put the appliance back in line, repeat the steps above and replace the string "ALARM" with "OK".
Method 2: Invoke via AWS Command Line Interface
- Make sure you have the proper credentials to run AWS CLI command (aws-adfs login if necessary).
aws lambda invoke \
--function-name My-HALambdaFunction-Name \
--invocation-type Event \
--payload '{"Records": [{"Sns": {"Message": "{\"NewStateValue\": \"ALARM\",\"Trigger\": {\"Dimensions\": [{\"value\": \"i-0000000000000000\",\"name\": \"InstanceId\"}]}}"}}]}' \
response.json
-
Replace "My-HALambdaFunction-Name" with your full HALambdaFunction name.
-
Replace "i-0000000000000000" with your appliance instance id.
-
The "response.json" is a required parameter for the command, but does not contain useful information.
-
The log for the function can be found in the corresponding AWS CloudWatch log group. (Log group name should be the same as the Lambda function name.)
- Click Upgrade. Wait until Upgrade process is complete. On your Network Security Appliance page, the Version column of your appliance should show "Up to date".
-
Re-enable CloudWatch alarms as described below:
- Run this command:
aws cloudwatch enable-alarm-actions --alarm-names"CloudWatch Alarm Name”
- Verify the "ActionsEnabled" field is true:
aws cloudwatch describe-alarms --alarm-names "CloudWatch Alarm Name" | grep "ActionsEnabled"
- Run this command:
-
To put the appliance back in line, repeat the steps above and replace the string "ALARM" with "OK".