This library provides CDK constructs that can be used to fully automate a Minecraft server running on ECS.
This library supports both Java and Bedrock servers, using docker images from the following projects:
- Java: https://github.com/itzg/docker-minecraft-server
- Bedrock: https://hub.docker.com/r/itzg/minecraft-bedrock-server
- Cost savings by automatically suspending the Minecraft server task when no one is playing
- Automatic backups with configurable retention policies
- Automated modpack installation (for Java Minecraft servers)
- Centralized monitoring using AWS Cloudwatch logs and metrics
This simple line will deploy a new vanilla Java Minecraft server with default settings, including automatic backups, cost savings, and more.
const world = new JavaWorld(this, props.name, {
dns: {
hostName: 'test.example.com',
hostedZone
}
});
You can enable SFTP access to the filesystem for maintenance activities.
This will add a second container to the ECS task definition that uses this docker image: https://github.com/atmoz/sftp.
Provide a secret when enabling SFTP access with credentials for access over SFTP. The value of the secret should be in
the format of username:password
. See the https://github.com/atmoz/sftp for more options.
const parameter = StringParameter.fromStringParameterName(world, 'UsersParameter', 'users');
const world = new JavaWorld(this, props.name, {
dns: {
hostName: 'test.example.com',
hostedZone
}
});
world.enableSftp(Secret.fromSsmParameter(parameter));
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit tests