Skip to content

engineal/aws-cdk-minecraft

Repository files navigation

Node.js CI npm (scoped) npm bundle size (scoped) Snyk Vulnerabilities for npm scoped package Libraries.io dependency status for latest release, scoped npm package NPM

Minecraft CDK constructs

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:

Features:

  • 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

Example

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
    }
});

Features

SFTP

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.

Example
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));

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests

About

An AWS CDK library that provides constructs to fully automate a Minecraft server running on ECS

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published