Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EREGS-2858: Convert Static-Assets serverless to CDK #1508

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

addis-samtek
Copy link
Contributor

@addis-samtek addis-samtek commented Jan 3, 2025

Convert Static Assets Stack from Serverless to CDK

Resolves EREGCSC-2858

Description

This PR migrates the Static Assets infrastructure from Serverless Framework to AWS CDK. This is part of our broader initiative to standardize our infrastructure as code using CDK.

This pull request changes:

  • Introduces new StaticAssetsStack CDK construct
  • Migrates CloudFront distribution configuration to CDK
  • Converts S3 bucket configuration for static assets
  • Implements WAF rules using CDK constructs
  • Adds Python Lambda layer for dependencies
  • Configures proper resource naming using StageConfig
  • Implements cross-stack resource sharing (exports/imports)

Verify Deployment

Create MR, verify deployment in ephemeral environment through GitHub Actions pipeline (check CloudFront distribution, S3 bucket and cache invalidation in AWS Console after pipeline completes).

Copy link

github-actions bot commented Jan 3, 2025

✨ See the Django Site in action

@addis-samtek addis-samtek added the Needs Review This PR needs a code review label Jan 3, 2025
Copy link
Contributor

@cgodwin1 cgodwin1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved tentatively noting that before prod-ready, needs Django's collectstatic in the action, and also will need the step to build and deploy Vue assets post-Django-deploy.

Additionally, some cleanup will be needed during the refactor stage: namely removal of debug statements and general linting.

@cgodwin1 cgodwin1 added Approved and removed Needs Review This PR needs a code review labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants