This is a version of minecraft-spot-pricing converted to CDK code.
There is a construct (lib/cdk-minecraft-spot-pricing.ts) that I may publish as an independent NPM module in the future, and a stack (lib/cdk-minecraft-stack) that uses the construct and adds extra autoscaling rules to shut down the server when not in use.
DEBUG=true
TIMEZONE_OFFSET=-5
CONTAINER_ENV={"DIFFICULTY":"normal"}
HOSTED_ZONE_ID="ABC123"
DNS_RECORD_NAME="minecraft.example.com"
EC2_KEY_NAME="my-key"
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testscdk deploydeploy this stack to your default AWS account/regioncdk diffcompare deployed stack with current statecdk synthemits the synthesized CloudFormation template