Technically, yes, although this will require the use of a Lambda function.
It's important to note that AWS requires you SHUT DOWN the instance to resize it (unlike Azure). So you need to be VERY careful about accidentally shutting down your Production instances.
To resize an AWS EC2 instance, it's 3 steps:
Additional resources: