AWS Builder Center
Weekend Creative Challenge: Slack Logo Animator

Weekend Creative Challenge: Slack Logo Animator

Upload a logo, pick Love or Fire, and get back a Slack-ready animated GIF. Built with Cognito, CloudFront, API Gateway, Lambda, and S3, fully provisioned with Terraform.

AWS Solutions Architect

Vision & what the app does

Every team ends up with a handful of custom Slack emoji built from the company logo: the little wave, the nod, the "on it." Making one that actually moves usually means opening an image editor, drawing frames by hand, and exporting a GIF small enough for Slack to accept. That is a lot of friction for something meant to make people smile for two seconds.
Slack Logo Animator turns a static PNG logo into a Slack-ready animated GIF in one click. Upload a logo, pick a vibe (Love or Fire), and the app renders a short looping animation around it: a cartoon bonfire with rising embers, or a cluster of pink hearts floating past. The result downloads at 128x128, comfortably under Slack's custom emoji size limit, ready to drop straight into a workspace as an emoji or reaction.
Screenshot of the Slack Logo Animator web app home screen, showing a dashed upload box with the text Click to upload a logo, a note reading Supported format PNG, two effect selection buttons labeled Love and Fire, and a pink Animate it button

What triggers it: A signed-in user uploads a PNG and picks an effect. The browser sends the image straight to a single API endpoint, no intermediate upload step.
What it does on its own: A Lambda function strips the logo out of its background, generates the animation frames with Pillow and numpy, composites them back over the logo with a thin outline so it still pops against the effect, and encodes everything into a GIF with real alpha transparency.
How it reports back: The API returns a presigned S3 URL. The browser shows the animated result inline and offers a direct download link.
Screenshot of the app after generating a Love animation, showing the AWS logo surrounded by small pink and magenta heart shapes floating upward, with a Download GIF link below

Screenshot of the app after generating a Fire animation, showing the AWS logo with cartoon style orange and yellow flames rising behind it and small ember particles floating around it, with a Download GIF link below


How you built it

This was my first project built with Claude Code rather than Amazon Kiro, which I had used for a series of earlier Terraform demo projects in the same repository. The scaffolding conventions carried over directly: a shared  create-terraform-project.sh --fullstack  script, one  aws_<service>.tf  file per AWS service, and a Terraform module instantiated from an environment-specific configuration.

Development Process

The build happened in three passes rather than one long push.
Pass one stood up the minimum working pipeline: a single Lambda function, an HTTP API route, and an S3 bucket for the generated GIFs, with a placeholder effect (a pulsing color tint) just to prove upload, process, and download worked end to end before investing in any visual polish.
Pass two replaced the placeholder with the real creative work. I already had a local Python script,  fire_gif.py , that draws a procedural cartoon bonfire (wavy flame layers, rising embers) using Pillow and numpy, no external art assets. (I have been using this script for fun at work for a while, animating logos of services and companies whenever they go down. It always gets a laugh in Slack. This app is really just the AWS-deployed version of something I already play with daily.) I ported it into the Lambda largely unchanged and built a matching Love effect from scratch: a parametric heart curve, colored in a handful of pink tones, animated to float upward and fade in and out on a seamless loop. Both effects share a background-removal step and a GIF encoder, factored into one  imaging.py  module so the two effect files stay focused on their own geometry.
Pass three added authentication and a real hosted frontend: an Amazon Cognito user pool gating the API behind a JWT authorizer, and CloudFront in front of a private S3 bucket for the static site, with  terraform apply  itself syncing the frontend and publishing a small runtime  config.json  (API URL, Cognito domain, client ID) so no backend value is ever hardcoded into the JavaScript.

Key Decisions

  • Cognito's own hosted UI, not a custom login form. The frontend is plain HTML, CSS, and JavaScript with no build step, so I hand-rolled the Authorization Code plus PKCE flow ( crypto.subtle  for the SHA-256 code challenge) instead of pulling in the Amplify SDK. It comes out to roughly a hundred lines and needs no bundler.
  • No Lambda layer. Pillow and numpy are cross-compiled for  arm64  and bundled directly into the deployment zip with  pip install --platform manylinux2014_aarch64 --only-binary=:all: . One artifact to reason about, and the zip lands at 18 MB, well under the 50 MB direct-upload limit.
  • CloudFront's native  *.cloudfront.net  domain, no custom domain. Skipping a domain means skipping an ACM certificate and Route 53 entirely, and it keeps the distribution on standard on-demand billing with no CloudFront Savings Bundle commitment.
  • PNG only, not PNG and JPEG. More on why below.

Challenges

The most instructive bug had nothing to do with the creative effects. Background removal works by trusting the image's own alpha channel when one exists, and falling back to guessing a background color from the image's corners when it does not. JPEG has no alpha channel at all, so every JPEG upload fell into the guessing path, and that heuristic simply is not reliable enough for anything other than a flat, single-color background. The visible symptom was blunt: the background never got removed, so it sat on top of the logo instead of behind the effect. Rather than trying to perfect a heuristic that is fundamentally guessing, I scoped it down: PNG only, validated server-side with a clean  400  response and a friendly message instead of the raw  500  a mismatched format produced before the fix.
A smaller but equally real bug turned up in the frontend: the result section (the generated GIF preview and its download link) was supposed to stay hidden until an animation actually existed, using the HTML  hidden  attribute. It never actually hid, because a  .result { display: flex }  rule in the stylesheet, an ordinary author-level CSS rule, silently overrides the browser's own default  [hidden] { display: none }  rule. The fix is a single global rule,  [hidden] { display: none !important; } , and it is now the standard defense against that exact class of bug for the rest of the page.
Two more surfaced during the very first  terraform apply : S3 bucket names must be lowercase, and the project's naming prefix had been left in PascalCase; and the Lambda build script called  pip , which only resolves via a shell alias in an interactive terminal and does not exist in the non-interactive shell Terraform's  local-exec  provisioner actually runs in. Both were one-line fixes, but neither would have surfaced without a real deploy.

AWS services used / architecture overview

Architecture diagram showing a browser reaching CloudFront and Cognito, a request flowing to API Gateway with a JWT authorizer that validates against Cognito, API Gateway invoking a Lambda function, the Lambda writing to an S3 bucket and returning a presigned URL back through API Gateway to the browser, with a second S3 bucket serving the frontend behind CloudFront

The flow works as follows:
  1. Amazon CloudFront serves the static frontend from a private S3 bucket, reached only through an Origin Access Control, over CloudFront's own  *.cloudfront.net  domain.
  1. Amazon Cognito provides the sign-in screen through its hosted UI. There is exactly one admin-managed account; the pool has no public sign-up.
  1. The browser calls Amazon API Gateway ( POST /animate ) directly, carrying the Cognito ID token as a bearer token.
  1. API Gateway's built-in JWT authorizer validates that token against the user pool before the request ever reaches application code.
  1. AWS Lambda (Python, Pillow, and numpy) removes the logo's background, renders the chosen effect's animation frames, and re-composites the logo on top.
  1. The Lambda writes the finished GIF to an Amazon S3 bucket with a one-day lifecycle expiration, and returns a presigned GET URL in the response.
  1. The browser displays the GIF inline using that URL and offers it as a direct download.

Infrastructure as Code

Everything is provisioned with Terraform: a reusable module under backend/infrastructure/ (one aws_<service>.tf file per service, following the same convention used across this repository's other projects), instantiated from backend/environments/dev/. The frontend has no separate deployment pipeline. frontend_deploy_enabled = true makes a plain terraform apply also sync the static files to S3, publish the runtime configuration file, and invalidate the CloudFront cache, so infrastructure and frontend never drift out of sync with each other.

What you learned

Weekend Creative Challenge: Slack Logo Animator

Vision & what the app does

Every team ends up with a handful of custom Slack emoji built from the company logo: the little wave, the nod, the "on it." Making one that actually moves usually means opening an image editor, drawing frames by hand, and exporting a GIF small enough for Slack to accept. That is a lot of friction for something meant to make people smile for two seconds.
Slack Logo Animator turns a static PNG logo into a Slack-ready animated GIF in one click. Upload a logo, pick a vibe (Love or Fire), and the app renders a short looping animation around it: a cartoon bonfire with rising embers, or a cluster of pink hearts floating past. The result downloads at 128x128, comfortably under Slack's custom emoji size limit, ready to drop straight into a workspace as an emoji or reaction.
What triggers it: A signed-in user uploads a PNG and picks an effect. The browser sends the image straight to a single API endpoint, no intermediate upload step.
What it does on its own: A Lambda function strips the logo out of its background, generates the animation frames with Pillow and numpy, composites them back over the logo with a thin outline so it still pops against the effect, and encodes everything into a GIF with real alpha transparency.
How it reports back: The API returns a presigned S3 URL. The browser shows the animated result inline and offers a direct download link.

How you built it

This was my first project built with Claude Code rather than Amazon Kiro, which I had used for a series of earlier Terraform demo projects in the same repository. The scaffolding conventions carried over directly: a shared  create-terraform-project.sh --fullstack  script, one  aws_<service>.tf  file per AWS service, and a Terraform module instantiated from an environment-specific configuration.

Development Process

The build happened in three passes rather than one long push.
Pass one stood up the minimum working pipeline: a single Lambda function, an HTTP API route, and an S3 bucket for the generated GIFs, with a placeholder effect (a pulsing color tint) just to prove upload, process, and download worked end to end before investing in any visual polish.
Pass two replaced the placeholder with the real creative work. I already had a local Python script,  fire_gif.py , that draws a procedural cartoon bonfire (wavy flame layers, rising embers) using Pillow and numpy, no external art assets. (I have been using this script for fun at work for a while, animating logos of services and companies whenever they go down. It always gets a laugh in Slack. This app is really just the AWS-deployed version of something I already play with daily.) I ported it into the Lambda largely unchanged and built a matching Love effect from scratch: a parametric heart curve, colored in a handful of pink tones, animated to float upward and fade in and out on a seamless loop. Both effects share a background-removal step and a GIF encoder, factored into one  imaging.py  module so the two effect files stay focused on their own geometry.
Pass three added authentication and a real hosted frontend: an Amazon Cognito user pool gating the API behind a JWT authorizer, and CloudFront in front of a private S3 bucket for the static site, with  terraform apply  itself syncing the frontend and publishing a small runtime  config.json  (API URL, Cognito domain, client ID) so no backend value is ever hardcoded into the JavaScript.

Key Decisions

  • Cognito's own hosted UI, not a custom login form. The frontend is plain HTML, CSS, and JavaScript with no build step, so I hand-rolled the Authorization Code plus PKCE flow ( crypto.subtle  for the SHA-256 code challenge) instead of pulling in the Amplify SDK. It comes out to roughly a hundred lines and needs no bundler.
  • No Lambda layer. Pillow and numpy are cross-compiled for  arm64  and bundled directly into the deployment zip with  pip install --platform manylinux2014_aarch64 --only-binary=:all: . One artifact to reason about, and the zip lands at 18 MB, well under the 50 MB direct-upload limit.
  • CloudFront's native  *.cloudfront.net  domain, no custom domain. Skipping a domain means skipping an ACM certificate and Route 53 entirely, and it keeps the distribution on standard on-demand billing with no CloudFront Savings Bundle commitment.
  • PNG only, not PNG and JPEG. More on why below.

Challenges

The most instructive bug had nothing to do with the creative effects. Background removal works by trusting the image's own alpha channel when one exists, and falling back to guessing a background color from the image's corners when it does not. JPEG has no alpha channel at all, so every JPEG upload fell into the guessing path, and that heuristic simply is not reliable enough for anything other than a flat, single-color background. The visible symptom was blunt: the background never got removed, so it sat on top of the logo instead of behind the effect. Rather than trying to perfect a heuristic that is fundamentally guessing, I scoped it down: PNG only, validated server-side with a clean  400  response and a friendly message instead of the raw  500  a mismatched format produced before the fix.
A smaller but equally real bug turned up in the frontend: the result section (the generated GIF preview and its download link) was supposed to stay hidden until an animation actually existed, using the HTML  hidden  attribute. It never actually hid, because a  .result { display: flex }  rule in the stylesheet, an ordinary author-level CSS rule, silently overrides the browser's own default  [hidden] { display: none }  rule. The fix is a single global rule,  [hidden] { display: none !important; } , and it is now the standard defense against that exact class of bug for the rest of the page.
Two more surfaced during the very first  terraform apply : S3 bucket names must be lowercase, and the project's naming prefix had been left in PascalCase; and the Lambda build script called  pip , which only resolves via a shell alias in an interactive terminal and does not exist in the non-interactive shell Terraform's  local-exec  provisioner actually runs in. Both were one-line fixes, but neither would have surfaced without a real deploy.

AWS services used / architecture overview

The flow works as follows:
  1. Amazon CloudFront serves the static frontend from a private S3 bucket, reached only through an Origin Access Control, over CloudFront's own  *.cloudfront.net  domain.
  1. Amazon Cognito provides the sign-in screen through its hosted UI. There is exactly one admin-managed account; the pool has no public sign-up.
  1. The browser calls Amazon API Gateway ( POST /animate ) directly, carrying the Cognito ID token as a bearer token.
  1. API Gateway's built-in JWT authorizer validates that token against the user pool before the request ever reaches application code.
  1. AWS Lambda (Python, Pillow, and numpy) removes the logo's background, renders the chosen effect's animation frames, and re-composites the logo on top.
  1. The Lambda writes the finished GIF to an Amazon S3 bucket with a one-day lifecycle expiration, and returns a presigned GET URL in the response.
  1. The browser displays the GIF inline using that URL and offers it as a direct download.

Infrastructure as Code

Everything is provisioned with Terraform: a reusable module under  backend/infrastructure/  (one  aws_<service>.tf  file per service, following the same convention used across this repository's other projects), instantiated from  backend/environments/dev/ . The frontend has no separate deployment pipeline.  frontend_deploy_enabled = true  makes a plain  terraform apply  also sync the static files to S3, publish the runtime configuration file, and invalidate the CloudFront cache, so infrastructure and frontend never drift out of sync with each other.

What you learned

API Gateway's JWT Authorizer Removes Auth Logic from Application Code

By configuring the JWT authorizer directly on Amazon API Gateway, token validation never reaches the Lambda function. The function only runs if the token is already verified. This keeps the application code focused entirely on image processing, with zero authentication logic inside it.

Cost Stays Effectively Zero at This Scale

AWS Lambda, Amazon API Gateway (HTTP API), Amazon CloudFront, Amazon S3 with one-day lifecycle expiration, and Amazon Cognito with a single user all sit comfortably inside AWS Free Tier limits for personal or small-team use. There is no idle cost between requests and nothing provisioned that bills by the hour.

Link to app or repo

The app uses Amazon Cognito with no public sign-up. If you would like to try it, leave a comment on this post and I (Carlos Biagolini) will create a user for you.
Full source code and Terraform infrastructure:  https://github.com/biagolini/TerraformSlackLogoAnimator 

Stay Connected

For more content on AWS, serverless architectures, and cloud infrastructure:
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article