Instead of a resident process, Welt also runs on AWS Lambda: lambda_function.py serves the same conversation flow on the Lambda Python runtime. template.yaml is an AWS SAM template that creates the function, its IAM role, and the Function URL.
The setup below assumes your agent is already deployed on AgentCore Runtime and your Slack app is created.
-
Clone this repository, build the function package, and deploy:
git clone https://github.com/iwamot/welt.git cd welt sam build sam deploy --guidedDuring
sam deploy --guided:- The stack parameters are
SlackBotToken,SlackSigningSecret(Basic Information > Signing Secret), andAgentArn. - Answer
ytoWeltFunction Function Url has no authentication— Slack requests are verified with the signing secret instead. - Note the
FunctionUrlstack output; the next step needs it.
- The stack parameters are
-
In the Slack app manifest, start from
manifest.ymland replace itssettings:section — HTTP serving turns Socket Mode off and receives both events and button presses at the Function URL:settings: event_subscriptions: request_url: https://<url-id>.lambda-url.<region>.on.aws/ # the FunctionUrl output bot_events: - message.channels - message.groups - message.im - message.mpim interactivity: is_enabled: true request_url: https://<url-id>.lambda-url.<region>.on.aws/ # the same FunctionUrl socket_mode_enabled: false
- Agent replies are bounded by Lambda's 15-minute cap.
sam build && sam deployredeploys after a change.sam deleteremoves everything the setup created.