# Deployment guide

**Before**: 
1. Disable CW rule for SLZ job_manager_lambda [here](https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#rules:name=prod-job-manager-trigger)
2. Disable CW rule for EXP exp-sf-runner lambda [here](https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#rules:name=6818e51b882f83061a36e2024123-exp_sf_runner_lambda.lambda_handler)

Hint: to disable rule on PROD, use Octopus [here](https://octopus.delphi.zone/app#/Spaces-1/projects/delphi-slz-deploy/operations/runbooks)
3. Wait until all SF executions in SLZ and EXP finish 
[here](https://console.aws.amazon.com/states/home?region=us-east-1#/statemachines/view/arn:aws:states:us-east-1:323555055331:stateMachine:prod-delphi-slzMainFlow)
   and [here](https://console.aws.amazon.com/states/home?region=us-east-1#/statemachines/view/arn:aws:states:us-east-1:323555055331:stateMachine:prod-delphi-explorationFlow)

**Deployment**:

Deploy all required components and if **exp_sf_runner_lambda** is on the list,
it **should be deployed LAST**
(During deployment of this lambda CW event for EXP is recreated and enabled)

**After:**
1. Enable CW rule for SLZ job_manager_lambda [here](https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#rules:name=prod-job-manager-trigger)
2. Enable CW rule for EXP exp-sf-runner lambda [here](https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#rules:name=6818e51b882f83061a36e2024123-exp_sf_runner_lambda.lambda_handler)
or just check that it was already enabled if exp_sf_runner_lambda was redeployed
3. Check that new SF executions starting in SLZ and EXP 
   [here](https://console.aws.amazon.com/states/home?region=us-east-1#/statemachines/view/arn:aws:states:us-east-1:323555055331:stateMachine:prod-delphi-slzMainFlow)
   and [here](https://console.aws.amazon.com/states/home?region=us-east-1#/statemachines/view/arn:aws:states:us-east-1:323555055331:stateMachine:prod-delphi-explorationFlow)
