Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmorgan81/kittenbot
Daily AI Generated Kittens
https://github.com/dmorgan81/kittenbot
ai aws aws-cloudfront aws-lambda aws-s3 dezgo go golang kittens terraform
Last synced: about 20 hours ago
JSON representation
Daily AI Generated Kittens
- Host: GitHub
- URL: https://github.com/dmorgan81/kittenbot
- Owner: dmorgan81
- License: isc
- Created: 2023-07-12T18:01:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-16T14:30:48.000Z (11 days ago)
- Last Synced: 2024-09-23T04:33:06.714Z (4 days ago)
- Topics: ai, aws, aws-cloudfront, aws-lambda, aws-s3, dezgo, go, golang, kittens, terraform
- Language: Go
- Homepage: https://kittenbot.io
- Size: 132 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kittenbot
The repo contains everything required for deploying [kittenbot.io](https://kittenbot.io). You can also use this repo to create a clone for a different domain.
## Requirements
To successfully deploy this you will need a few things:
* A [Dezgo](https://dezgo.com) API key and some credits in your account. Because we generate a single image a day those credits will last quite a while.
* A [Terraform Cloud](https://app.terraform.io) account.
* A registered domain. Currently this domain is assumed to be registered with AWS.## Design
At its core this is simply a static website hosted in S3 and served by CloudFront. CloudFront does most of the heavy lifting, including caching.
An EventBridge schedule invokes a lambda every day. The lambda makes a call to Dezgo to generate an image with the passed in prompt and model; the prompt and model are configured via Terraform variables. The lambda then templates out a new `latest.html` and uploads everything to S3. Finally the lambda creates a CloudFront cache invalidation for `latest.html` and the generated image.