A Go-based AWS Lambda function that fetches and aggregates server status information for Dungeons & Dragons; Online, an MMO by Standing Stone games.
📝 Note: This is a fan-driven project, not affiliated with Standing Stone Games, Daybreak Games, or Wizards of the Coast. See our full disclaimer for more information.
- Fetches server information from a configurable datacenter URL
- Concurrent processing of multiple server status endpoints
- Returns sorted server information based on server order
- Handles XML parsing with charset support
- Implements worker pool pattern for efficient concurrent requests
- AWS Lambda compatible
- CORS enabled
- Go 1.24 or later
- AWS CLI configured with appropriate credentials
- AWS SAM CLI (optional, for local testing)
| Variable | Description | Required |
|---|---|---|
| DATACENTER_URL | URL of the primary datacenter XML endpoint | Yes |
-
Clone the repository:
git clone <repository-url> cd <project-directory>
-
Install dependencies:
go mod download
-
Build for AWS Lambda:
GOOS=linux GOARCH=amd64 go build -o bootstrap main.go zip function.zip bootstrap
-
Create a new Lambda function in AWS Console:
- Runtime: Custom runtime on Amazon Linux 2
- Handler: bootstrap
- Architecture: x86_64
-
Set the environment variable:
- Key: DATACENTER_URL
- Value: Your datacenter XML endpoint URL
-
Upload the function:
aws lambda update-function-code \ --function-name YOUR_FUNCTION_NAME \ --zip-file fileb://function.zip
-
Create a
template.yaml:AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Resources: ServerStatusFunction: Type: AWS::Serverless::Function Properties: CodeUri: . Handler: bootstrap Runtime: provided.al2 Environment: Variables: DATACENTER_URL: your-datacenter-url Events: ApiEvent: Type: Api Properties: Path: /status Method: get
-
Deploy:
sam build sam deploy --guided
{
"servers": [
{
"name": "ServerName",
"commonName": "Server Common Name",
"status": true,
"order": 1
}
],
"errors": [
"Error message if any"
]
}To test locally with AWS SAM:
sam local start-apiThen access the endpoint at: http://localhost:3000/status
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details
This project is a fan-driven initiative and is not affiliated with, endorsed by, or connected to Standing Stone Games, Daybreak Games, or Wizards of the Coast in any way.
All trademarks, properties, and copyrights belong to their respective owners. This is a free fan project created under fair use.
Veteran Software operates independently and is not sponsored by, officially connected to, nor endorsed by any of the aforementioned companies. Any trademarks, registered trademarks, product names, and company names or logos mentioned are used for identification purposes only and remain the property of their respective owners.
This project is intended to support the gaming community and operates on a non-commercial basis.