Closed chrisaballard closed 2 years ago
Should we use this AWS CloudFormation template for scheduling the EC2 instance? https://aws.amazon.com/solutions/implementations/instance-scheduler/
Alternatively we could manually set up a schedule using AWS Lambda functions https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-cloudwatch/
Tried using elasticdump
to export the index to my local machine so I could re-index it in an EC2 opensearch instance, but it was very slow. I'm going to set up the new opensearch instance and re-run the load instead.
The new instance has been set up with 1 shard rather than 5 shards which exist on the managed Opensearch instance. From Elasticsearch guidance this seems like the correct thing to do, and may help us reduce our resource usage (each shard has separate overhead).
I set up a cron
job to auto-start opensearch and opensearch-dashboards on reboot. Tested that it works both when restarting the ec2 machine, and stopping it then starting it again.
Schedule set up on EventBridge for online time 6am-10pm weekdays
This should save 40-50% on costs