This is an AWS CDK template for creating a service that receives outgoing subscription messages from SkyWatch EarthCache and sends block-formatted messages to a Slack incoming webhook app.
- Create a Slack webhook app. You will create a
Webhook URL
and install the app to a channel in your Slack workspace. - Set environment variables like those found in
.envrc_template
:
- SKYWATCH_API_KEY = your SkyWatch EarthCache API key
- SLACK_WEBHOOK_URL = Slack webhook URL created above, starting with
/services/...
- Synth (
cdk synth
) and deploy (cdk deploy
) the CDK stack within this repo, which creates an API Gateway and a Lambda Function in your authenticated AWS account. - Once the stack has been created, use the output API Gateway URL + Lambda Function name as the
callback_uri
when creating a subscription to SkyWatch EarthCache.