What youโll learn: Every DynamoDB table, every MySQL table, and every REST API endpoint in EPIC โ with field descriptions and example data.
Section 1 โ DynamoDB Tables (NoSQL)
DynamoDB is Amazonโs NoSQL database. Think of it as a big JSON store. Each item is a JSON object.
How DynamoDB works:
- Each table has a Primary Key (and optional Sort Key)
- Items with same PK but different SK are grouped
- For EPIC: most tables use
{ResourceId, VersionId}as PK+SK (versioned storage)
Table 1: FleetTable
Purpose: Stores fleet configurations
Primary Key: FleetId (String)
Sort Key: VersionId (Number)
{
"FleetId": "FORTRESSService-NA-X0",
"VersionId": 5,
"LatestVersionId": 5,
"ServiceId": "FORTRESSService",
"AuditMetadata": {
"Message": "Updated host throughput",
"User": "jsmith",
"Timestamp": "2024-06-01T10:00:00Z"
},
"FleetConfiguration": {
"ApolloName": "FORTRESSService_NA_X0",
"Region": "us-east-1",
"HostThroughPutTPM": 250,
"BufferPercentage": 10,
"CTFactor": 1.5,
"MaxHostCount": 200,
"HostType": "c5.2xlarge",
"ASGProperties": [
{
"AutoScalingGroupName": "FORTRESSService/NA/X0/Prod/1a",
"AvailabilityZone": "us-east-1a",
"MaxInstance": 50,
"MinInstance": 5,
"DesiredCapacity": 50
},
{
"AutoScalingGroupName": "FORTRESSService/NA/X0/Prod/1b",
"AvailabilityZone": "us-east-1b",
"MaxInstance": 50,
"DesiredCapacity": 50
}
],
"ChildApolloEnvs": [
{ "ApolloName": "FORTRESSService_NA_X0_Child1", "SumDesiredCapacity": 10 }
],
"EAPEnrolledStatus": true,
"Homogeneous": true
},
"EventId": "PD2024",
"FleetProjection": [
{
"TotalInputTPMProperties": {
"TotalInputTPM": 50000,
"TotalInputTPMLinkVerifiedByCustomer": true
},
"ProjectionType": "CloudTune"
}
],
"HostOrderStatuses": [
{
"HostsPendingApproval": {
"us-east-1a": 20,
"us-east-1b": 20,
"us-east-1c": 10
}
}
]
}
Key fields explained:
LatestVersionIdโ always equals the highest VersionId; DynamoDB stores ALL versionsApolloNameโ name used to look up this fleet in Apollo systemHostThroughPutTPMโ how many transactions per minute ONE host can handleCTFactorโ CloudTune peak factor (how much traffic grows at peak vs BAU)BufferPercentageโ safety buffer (10 = 10% extra hosts)ASGPropertiesโ list of Auto Scaling Groups with their configuration
Table 2: ServiceTable
Purpose: Stores service configurations
Primary Key: ServiceId (String)
Sort Key: VersionId (Number)
{
"ServiceId": "FORTRESSService",
"VersionId": 3,
"LatestVersionId": 3,
"ServiceType": "Registered",
"Owner": "fortress-owner@amazon.com",
"LeaderAlias": "jsmith",
"Fleet": [
{
"Region": "NA",
"Fleets": ["FORTRESSService-NA-X0", "FORTRESSService-NA-X6"]
},
{
"Region": "EU",
"Fleets": ["FORTRESSService-EU-X0"]
}
],
"Philosophy": {
"MaxHosts": 500,
"MinHosts": 10,
"CapacityStrategy": "PerformanceBased"
},
"OnboardingStatus": "Completed",
"ServiceTier": "Tier1"
}
Table 3: EventTable
Purpose: Stores peak event configurations
Primary Key: EventId (String)
Sort Key: VersionId (Number)
{
"EventId": "PD2024",
"VersionId": 2,
"LatestVersionId": 2,
"EventName": "Prime Day 2024",
"EventType": "Peak",
"RegionList": ["us-east-1", "eu-west-1", "us-west-2"],
"SPCOEventDatesByRegion": {
"us-east-1": {
"SPCOStartDate": "2024-05-15",
"SPCOEndDate": "2024-07-20",
"GameDayDates": ["2024-06-01", "2024-06-15"]
},
"eu-west-1": {
"SPCOStartDate": "2024-05-15",
"SPCOEndDate": "2024-07-20"
}
},
"PeakStartDate": "2024-07-16",
"PeakEndDate": "2024-07-17",
"IsActive": true,
"EmergentScaleStartDate": "2024-07-09"
}
Key field: EmergentScaleStartDate โ after this date, HOTW treats all orders as emergent (urgent, Sev2 ticket opened)
Table 4: EventPlanTable โญ (Most Important for Milestones)
Purpose: Tracks milestone completion for each fleet ร event
Primary Key: EventPlanId (String) = {EventId}#{FleetId}
Sort Key: VersionId (Number)
{
"EventPlanId": "PD2024#FORTRESSService-NA-X0",
"VersionId": 8,
"LatestVersionId": 8,
"FleetId": "FORTRESSService-NA-X0",
"EventId": "PD2024",
"ServiceId": "FORTRESSService",
"EventMilestone": [
{
"EventMilestoneId": "GatherProjectionFromUpstream",
"MilestoneCompletionStatus": "Completed",
"MilestoneMessage": "All upstream projections verified",
"PeakReadyStatus": "Green",
"ETA": "2024-06-01",
"LastUpdatedTimestamp": "2024-06-01T12:00:00Z"
},
{
"EventMilestoneId": "HardwareOrder",
"MilestoneCompletionStatus": "Completed",
"MilestoneMessage": "[Automated] Hardware order placed: SPCO-789",
"PeakReadyStatus": "Green",
"SubMilestones": [
{
"EventMilestoneId": "PlaceHardwareOrder",
"MilestoneCompletionStatus": "Completed",
"MilestoneMessage": "50 hosts ordered via HOTW"
},
{
"EventMilestoneId": "HardwareOrderApproval",
"MilestoneCompletionStatus": "Completed",
"MilestoneMessage": "Order approved by AWS"
}
]
},
{
"EventMilestoneId": "HardwareFulfillment",
"MilestoneCompletionStatus": "InProgress",
"MilestoneMessage": "1 of 4 orders pending",
"PeakReadyStatus": "Yellow"
},
{
"EventMilestoneId": "CommunicateTPMToDownstream",
"MilestoneCompletionStatus": "NotStarted",
"PeakReadyStatus": "Red"
},
{
"EventMilestoneId": "UpdateThrottlingInSDC",
"MilestoneCompletionStatus": "NotStarted",
"PeakReadyStatus": "Red"
}
],
"EventDescaleMilestone": [
{
"EventMilestoneId": "GatherDescaleProjections",
"MilestoneCompletionStatus": "NotStarted"
}
],
"AuditMetadata": {
"Message": "HOTW placed hardware order",
"User": "HOTWAutomation",
"Timestamp": "2024-06-15T09:00:00Z"
}
}
Milestone IDs (in order):
GatherProjectionFromUpstreamโ collect traffic projectionsHardwareOrderโ place SPCO hardware order- Sub:
PlaceHardwareOrder - Sub:
HardwareOrderApproval
- Sub:
HardwareFulfillmentโ hardware deliveredCommunicateTPMToDownstreamโ tell downstream services your TPMUpdateThrottlingInSDCโ configure Gizmo throttling
Status values: NotStarted, InProgress, Completed, PendingOnEPIC, PendingOnServiceOwner, Blocked
PeakReadyStatus: Red (not ready), Yellow (in progress), Green (ready)
Table 5: ProjectionsTable
Purpose: Stores traffic projections
Primary Key: ProjectionId (String) = {FleetId}#{EventId}#{ProjectionType}
Sort Key: VersionId (Number)
{
"ProjectionId": "FORTRESSService-NA-X0#PD2024#Peak",
"VersionId": 3,
"FleetId": "FORTRESSService-NA-X0",
"EventId": "PD2024",
"ProjectionType": "Peak",
"TotalInputTPM": 50000,
"IsVerifiedByOwner": true,
"CloudTuneProjection": 48000,
"ManualOverride": 50000,
"ProjectionSource": "Manual",
"UpstreamProjections": [
{
"UpstreamServiceId": "OrderService",
"UpstreamTPM": 20000,
"IsVerified": true
}
]
}
Table 6: SchemaTable
Purpose: Stores data schemas (for dimensional projections)
Primary Key: SchemaId (String)
Table 7: EventProfileTable
Purpose: Stores event profile templates (pre-configured event settings)
Table 8: ExceptionTable
Purpose: Stores buffer factor exception requests
{
"ExceptionId": "EXCEPTION#FORTRESSService-NA-X0#PD2024",
"FleetId": "FORTRESSService-NA-X0",
"EventId": "PD2024",
"ExceptionType": "BufferFactor",
"RequestedValue": 1.3,
"CurrentValue": 1.1,
"BusinessReason": "30% traffic variance due to external APIs",
"BusinessDrivers": ["ThirdPartyDependency"],
"Status": "Approved",
"RequestedBy": "owner@amazon.com",
"ReviewedBy": "epic-team@amazon.com",
"ReviewTimestamp": "2024-05-20T15:00:00Z"
}
Table 9: FleetLockTable
Purpose: Prevents concurrent HOTW runs for the same fleet
Primary Key: FleetId (String)
{
"FleetId": "FORTRESSService-NA-X0",
"LockTimestamp": "2024-06-15T09:00:00Z",
"LockedBy": "HOTW-Run-5"
}
Table 10: BAUServiceDashboard
Purpose: BAU capacity tracking
Primary Key: ServiceId (String)
Section 2 โ MySQL Tables
MySQL is used for HOTW operational data because it needs complex queries.
hotw_run Table
Tracks each HOTW automation run:
| Column | Type | Description |
|---|---|---|
RunId |
INT AUTO_INCREMENT | Unique run ID (returned when run is created) |
EventIndexId |
INT | Numeric index for EventId |
RunStatus |
VARCHAR | โRunningโ or โCompletedโ |
OrderType |
VARCHAR | โStandardโ or โEmergentโ |
CreatedAt |
TIMESTAMP | When run was created |
-- Create a run
INSERT INTO hotw_run (EventIndexId, RunStatus) VALUES (42, 'Running');
-- Returns RunId = 5
-- Update with order type
UPDATE hotw_run SET OrderType = 'Standard'
WHERE EventIndexId = 42 AND RunId = 5;
hotw_execution Table
Detailed results for each fleet ร run:
| Column | Type | Description |
|---|---|---|
ExecutionId |
INT AUTO_INCREMENT | Unique execution ID |
FleetIndexId |
INT | Numeric index for FleetId |
ServiceIndexId |
INT | Numeric index for ServiceId |
EventIndexId |
INT | Numeric index for EventId |
RunId |
INT | References hotw_run |
PeakTPM |
INT | Peak traffic projection |
BAUTPM |
INT | Calculated BAU TPM |
CTPeakFactor |
DECIMAL(5,2) | CloudTune peak factor |
BufferFactor |
DECIMAL(5,2) | Buffer safety factor |
HostThroughPutTPM |
INT | TPM per host |
RequiredHosts |
INT | Calculated hosts needed |
HostsPresentInApollo |
INT | Current hosts in Apollo |
CapacityOverrideSum |
INT | Total capacity override |
PendingEPICFMCHostOrder |
INT | Pending FMC orders |
PreferredHostType |
VARCHAR | Preferred EC2 instance type |
Homogeneous |
BOOLEAN | Whether fleet uses one host type |
Status |
VARCHAR | โSuccessโ, โFailโ, โPartialSuccessโ |
Reasoning |
TEXT | Why order was/wasnโt placed |
FleetVersionId |
INT | Fleet DynamoDB version when run happened |
DesiredCapacity |
INT | Total desired capacity after order |
ChildDesiredCapacity |
INT | Child fleet desired capacity |
HostDistribution |
JSON | Hosts per host type: {"c5.2xlarge":50} |
User |
VARCHAR | Who triggered (auto/human alias) |
CreatedAt |
TIMESTAMP | Execution timestamp |
asg_details Table
Latest ASG configuration per fleet:
| Column | Description |
|---|---|
FleetIndexId |
Fleet reference |
AutoScalingGroupName |
Full ASG name (e.g., โRIPE/NA/PROD/1aโ) |
AsgTag |
Short tag (e.g., โ1aโ) |
HostType |
EC2 instance type (e.g., โc5.2xlargeโ) |
AutoScalingGroupRegion |
AWS region |
EAPOnboardingStatus |
Is ASG eligible for EAP? |
EAPEnableStatus |
Is EAP currently active? |
AsgCapacityLowerBound |
Minimum hosts in this ASG |
AutoScalingGroupARN |
Full AWS ARN for SPCO |
asg_details_run Table
Snapshot of ASG state at time of a specific HOTW run (historical):
Same columns as asg_details plus:
RunIdโ which run this snapshot was taken atRecommendedOverrideValueโ how many hosts HOTW recommends for this ASG
capacity_override_details Table
SPCO capacity override records:
| Column | Description |
|---|---|
CapacityOverrideName |
Name of the override |
StartTime |
When override starts |
Duration |
How long (e.g., โ2200 sโ) |
OverrideValue |
Maximum capacity during override |
OverrideExpiryValue |
Capacity after override expires |
OverrideTag |
Tag for filtering |
StartOffset |
Days before peak |
EndOffset |
Days after peak |
PlaceOrderIfRequired |
Should EPIC place order? |
OverrideType |
Type (Standard/Emergent) |
Justification |
Business reason |
RunId |
HOTW run reference |
FleetIndexId |
Fleet reference |
AutoScalingGroupName |
Which ASG |
fulfillment_details Table
FMC hardware delivery tracking:
| Column | Description |
|---|---|
FulfillmentId |
FMC order ID |
AutoScalingGroupName |
Which ASG ordered for |
FulfillmentType |
โStandardโ or โEmergentโ |
FulfillmentStatus |
โPendingโ, โApprovedโ, โFulfilledโ |
FulfillmentValue |
Number of hosts ordered |
FulfillmentDate |
Expected delivery date |
FulfillmentLink |
URL to FMC order |
IsEmergent |
Boolean |
RunId |
HOTW run reference |
FleetIndexId |
Fleet reference |
preferred_asg Table
User-configured preferred ASGs for HOTW:
| Column | Description |
|---|---|
RecordId |
Auto-increment ID |
FleetIndexId |
Fleet reference |
EventIndexId |
Event reference |
ASGs |
JSON array of preferred ASG names |
UpdatedBy |
User alias |
UpdatedAt |
Timestamp |
hotw_dashboard Table
Summary view for the HOTW dashboard:
| Column | Description |
|---|---|
ServiceIndexId |
Service reference |
FleetIndexId |
Fleet reference |
EventIndexId |
Event reference |
CapacityOverrideSum |
Total capacity ordered |
Purpose |
โUpscalingโ or โDescalingโ |
Section 3 โ REST API Reference
Complete list of all API endpoints:
Service APIs
| Method | Path | Handler | Description |
|---|---|---|---|
| POST | /service | Service.createService | Create new service |
| GET | /service | Service.getAllServices | Get all services |
| GET | /service/{ServiceId} | Service.getService | Get one service |
| PUT | /service/{ServiceId} | Service.updateService | Update service |
| DELETE | /service/{ServiceId} | Service.deleteService | Delete service |
Fleet APIs
| Method | Path | Handler | Description |
|---|---|---|---|
| POST | /fleet | Fleet.createFleet | Create fleet |
| GET | /fleet/{FleetId}/{EventId} | Fleet.getFleet | Get fleet for event |
| PUT | /fleet/{FleetId}/{EventId} | Fleet.updateFleetConfiguration | Update fleet config |
| GET | /fleet/event/{EventId} | Fleet.getAllFleetsForEvent | All fleets for event |
| GET | /fleet/{FleetId}/{EventId}/versions | Fleet.getVersionHistory | Version history |
Event APIs
| Method | Path | Handler | Description |
|---|---|---|---|
| POST | /event | Event.createEvent | Create event |
| GET | /event | Event.getAllEvents | All events |
| GET | /event/{EventId} | Event.getEvent | Get event |
| PUT | /event/{EventId} | Event.updateEvent | Update event |
| PUT | /event/{EventId}/dashboard | Event.getEventDashboard | Readiness dashboard |
| PUT | /event/{EventId}/dashboard/descaling | Event.getDescaleDashboard | Descale dashboard |
EventPlan APIs
| Method | Path | Handler | Description |
|---|---|---|---|
| POST | /eventplan | EventPlan.createEventPlan | Create event plan |
| GET | /eventplan/{EventId}/{FleetId} | EventPlan.getEventPlan | Get event plan |
| PUT | /eventplan/{EventId}/{FleetId}/milestones | EventPlan.updateMilestoneList | Replace milestones |
| PUT | /eventplan/{EventId}/{FleetId}/milestone | EventPlan.updateMilestoneDetail | Update milestone detail |
| PUT | /eventplan/{EventId}/{FleetId}/status | EventPlan.updateMilestoneStatus | Update milestone status |
| GET | /eventplan/{EventId}/{FleetId}/{VersionId} | EventPlan.getByVersion | Get specific version |
HOTW APIs (Node.js)
| Method | Path | Handler | Description |
|---|---|---|---|
| POST | /hotw/runDetail | HOTW.createOrUpdateHotwRunDetails | Create run |
| PUT | /hotw/runDetail | HOTW.updateHotwRunDetails | Update run |
| POST | /hotw/executionDetail | HOTW.createHotwExecutionDetails | Save execution |
| POST | /hotw/dashboardDetail | HOTW.createOrUpdateDashboardDetailsAndAsgDetails | Update dashboard |
| GET | /hotw/dashboard/{EventId}/{Purpose} | HOTW.getHotwDashboardDetails | Get dashboard |
| GET | /hotw/asgDetail/{FleetId} | HOTW.getAsgDetails | Get ASG details |
| GET | /hotw/executionDetail/{EventId}/{FleetId} | HOTW.getHOTWExecutionHistory | Execution history |
| GET | /hotw/asgDetail/{FleetId}/{RunId} | HOTW.getAsgDetailsForRunId | ASG at specific run |
| PUT | /hotw/asgsPreference/{EventId}/{FleetId} | HOTW.storePreferredASGs | Save preferred ASGs |
| GET | /hotw/asgsPreference/{EventId}/{FleetId} | HOTW.getPreferredASGs | Get preferred ASGs |
HOTW APIs (Java - Triggers)
| Method | Path | Handler | Description |
|---|---|---|---|
| POST | /hotw/atomic/{FleetId}/{EventId} | HotwHandler.atomicHotwTrigger | Trigger atomic HOTW |
Projection APIs
| Method | Path | Handler | Description |
|---|---|---|---|
| POST | /projection | Projection.createProjection | Create projection |
| GET | /projection/{FleetId}/{EventId} | Projection.getProjection | Get projection |
| PUT | /projection/{FleetId}/{EventId} | Projection.updateProjection | Update projection |
Throttling APIs
| Method | Path | Handler | Description |
|---|---|---|---|
| POST | /throttling | Throttling.createConfig | Create throttling config |
| GET | /throttling/{FleetId}/{EventId} | Throttling.getConfig | Get config |
| PUT | /throttling/{FleetId}/{EventId} | Throttling.updateConfig | Update config |
Ticket APIs
| Method | Path | Handler | Description |
|---|---|---|---|
| POST | /ticket | Ticket.createTicket | Create SIM ticket |
| GET | /ticket/{TicketId} | Ticket.getTicket | Get ticket |
| PUT | /ticket/{TicketId} | Ticket.updateTicket | Update ticket |
Other APIs
| Method | Path | Description |
|---|---|---|
| GET/POST/PUT | /pmet/โฆ | PMET metric links |
| GET/POST/PUT | /schema/โฆ | Data schemas |
| GET/POST/PUT | /exception/โฆ | Buffer factor exceptions |
| GET/POST/PUT | /calendar/โฆ | EPIC calendar |
| POST | /bulkjobs/โฆ | Bulk operations |
| GET/POST/PUT | /organization/โฆ | Organization structure |
| GET/POST/PUT | /philosophy/โฆ | Capacity philosophy |
| GET/POST/PUT | /dimension/โฆ | Dimensional projections |
| GET/POST | /employee/โฆ | Employee directory |
Section 4 โ Index Tables (MySQL)
DynamoDB uses string IDs but MySQL needs numeric indexes for efficient joins. EPIC maintains index mappings:
| MySQL table | String ID | Numeric Index |
|---|---|---|
fleet_index |
FleetId = "RIPE-NA" |
FleetIndexId = 42 |
service_index |
ServiceId = "RIPE" |
ServiceIndexId = 15 |
event_index |
EventId = "PD2024" |
EventIndexId = 7 |
How itโs used in Node.js:
// FleetOperations.getFleetIndex("RIPE-NA")
// โ SQL: SELECT FleetIndexId FROM fleet_index WHERE FleetId = "RIPE-NA"
// โ Returns: 42
// Then MySQL query uses the number:
// SELECT * FROM hotw_execution WHERE FleetIndexId = 42
Section 5 โ DynamoDB Access Patterns
DynamoDB is optimized for specific access patterns. EPIC uses:
1. Get latest version of a resource
// DynamoDB Query by PartitionKey + SortKey
await dynamoDB.query({
TableName: 'FleetTable',
KeyConditionExpression: 'FleetId = :fleetId AND VersionId = :latestVersion',
ExpressionAttributeValues: {
':fleetId': fleetId,
':latestVersion': latestVersionId
}
});
2. Get all versions (history)
// Query all items with same FleetId (sorted by VersionId)
await dynamoDB.query({
TableName: 'FleetTable',
KeyConditionExpression: 'FleetId = :fleetId',
ExpressionAttributeValues: { ':fleetId': fleetId }
});
3. Batch get multiple EventPlans
// Get EventPlans for 10+ fleets at once
await dynamoDB.batchGet({
RequestItems: {
'EventPlanTable': {
Keys: fleetIds.map(fleetId => ({
EventPlanId: `${eventId}#${fleetId}`,
VersionId: latestVersionId
}))
}
}
});
4. Conditional update (optimistic locking)
// Only update if VersionId hasn't changed (prevents concurrent conflicts)
await dynamoDB.put({
TableName: 'FleetTable',
Item: { ...updatedFleet, VersionId: currentVersion + 1 },
ConditionExpression: 'VersionId = :currentVersion',
ExpressionAttributeValues: { ':currentVersion': currentVersion }
});