A serverless AWS Lambda bot for automated GeoGuessr party management and Slack notifications.
Before you can deploy this project, you need to configure AWS credentials. SST will automatically use your AWS credentials to deploy resources.
Create or update your AWS credentials file:
macOS/Linux: ~/.aws/credentials
Windows: C:\Users\USER_NAME\.aws\credentials
[default]
aws_access_key_id = YOUR_ACCESS_KEY_ID
aws_secret_access_key = YOUR_SECRET_ACCESS_KEYIf you don't have AWS credentials yet:
Set these environment variables:
export AWS_ACCESS_KEY_ID=your_access_key_id
export AWS_SECRET_ACCESS_KEY=your_secret_access_key
# Optional for temporary credentials:
export AWS_SESSION_TOKEN=your_session_tokenIf you have multiple AWS accounts, you can configure multiple profiles:
[default]
aws_access_key_id = DEFAULT_ACCESS_KEY_ID
aws_secret_access_key = DEFAULT_SECRET_ACCESS_KEY
[staging]
aws_access_key_id = STAGING_ACCESS_KEY_ID
aws_secret_access_key = STAGING_SECRET_ACCESS_KEY
[production]
aws_access_key_id = PRODUCTION_ACCESS_KEY_ID
aws_secret_access_key = PRODUCTION_SECRET_ACCESS_KEYThen specify the profile in sst.config.ts:
providers: {
aws: {
profile: "staging"; // or use input.stage to switch profiles per stage
}
}You'll need to set up Slack secrets for the bot to work:
# Set your Slack bot token
pnpx sst secret set SlackBotToken "xoxb-your-slack-bot-token"
# Set your Slack channel ID or name
pnpx sst secret set SlackChannel "#your-channel-name"The E2E workflow runs the Playwright test on a schedule against the deployed stage, authenticating to AWS via GitHub OIDC.
The OIDC provider is an account-level singleton that sst.config.ts only references, so it must be created once per AWS account:
aws iam create-open-id-connect-provider \
--url https://token.actions.githubusercontent.com \
--client-id-list sts.amazonaws.com \
--thumbprint-list 6938fd4d98bab03faadb97b34396831e3780aea1Deploying then creates the role and prints its ARN as the githubE2eRole output. Set these repository variables (Settings → Secrets and variables → Actions → Variables):
AWS_ROLE_ARN— thegithubE2eRoleARN from the deploy outputAWS_DEPLOY_ROLE_ARN— thegithubDeployRoleARN from the deploy outputAWS_REGION— the region the app is deployed to (must matchsst.config.ts)SST_STAGE— the stage the workflows deploy and test against
Start the SST development server:
pnpx sst devThis will:
- Deploy your Lambda functions to AWS
- Set up the cron schedule
- Enable live development with instant updates
pnpx @puppeteer/browsers install chromium@latest --path /tmp/localChromiumAfter update your .env YOUR_LOCAL_CHROMIUM_PATH to point to your installed tmp local chromium
Deploy to production:
pnpx sst deploy --stage productionsrc/create-party.ts- Main Lambda handler for the bot functionalitysst.config.ts- SST infrastructure configuration with cron schedulingsst-env.d.ts- Auto-generated TypeScript definitions for SST resources