'Change instance type based on a time schedule in Amazon EC2

I have only 1 Linux instance.

Can we auto change the instance type based on a time schedule?

Eg: During day time I want t3a.2xlarge and after evening I want it changed to t3.small based on a time schedule.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source