Skip to content

Cleanup and naming config#5

Open
Andrew Gearhart (AndrewGearhart) wants to merge 2 commits intomainfrom
cleanup-and-naming-config
Open

Cleanup and naming config#5
Andrew Gearhart (AndrewGearhart) wants to merge 2 commits intomainfrom
cleanup-and-naming-config

Conversation

@AndrewGearhart
Copy link
Copy Markdown
Member

@AndrewGearhart Andrew Gearhart (AndrewGearhart) commented Sep 5, 2025

This pull request introduces environment-aware naming and configuration across the project to simplify multi-environment deployments (e.g., dev, prod). It standardizes how AWS resources are named and accessed, updates documentation and deployment instructions, and ensures that secrets and resource names are properly namespaced by environment and project. The changes affect the CDK stack, Lambda functions, Docker containers, and supporting scripts.

This will hopefully address #4

Environment-aware resource naming and configuration:

  • All major AWS resources (S3 buckets, ECS clusters, Lambda functions, Step Functions, CloudWatch dashboards, log groups) now use namespaced patterns based on <stackBase>-<env>, with account and region included where required for uniqueness. This applies to both CDK resource definitions and runtime environment variables. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

  • Lambda functions and ECS tasks receive STACK_BASE and ENV as environment variables, and resource policies are updated to reference secrets and buckets using these environment-aware names. [1] [2] [3]

Documentation and deployment workflow:

  • The README.md is updated with detailed instructions for environment-aware deployments, including new naming conventions, CDK context usage, and secrets management. Example deployment commands and secret naming patterns are provided. [1] [2] [3] [4]

Secrets and configuration management:

  • All code that accesses AWS Secrets Manager (Python and JavaScript) now uses the environment-aware secret path (/<stackBase>/<env>/client_credentials), instead of a hardcoded path. [1] [2] [3]

Container and runtime environment:

  • Dockerfiles for Python and JavaScript containers no longer set a fixed AWS region; region is now determined by the runtime environment, supporting multi-region deployments. [1] [2] [3]

These changes make the project more robust, flexible, and ready for multi-environment and multi-account AWS deployments.

… the project

- Updated README.md to include environment and naming guidelines for multi-environment deployments.
- Modified app.py to support environment-specific naming for resources and tags.
- Adjusted Dockerfiles to remove hardcoded AWS region and rely on task execution environment.
- Refactored secret retrieval in autotag.py and main.py files to use dynamic naming based on environment variables.
- Updated JavaScript files to utilize environment variables for AWS region configuration.
Copy link
Copy Markdown

@lauterman Jim Campbell (lauterman) left a comment

Choose a reason for hiding this comment

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

This fits the pattern we're striving for, nice job. Who is bg?

@AndrewGearhart
Copy link
Copy Markdown
Member Author

Repeating for the good of the order... bg = blue green ... it's just a non-standard example if we had some reason to put together an environment that wasn't specific to one of our standard cluster arguments.

Copy link
Copy Markdown
Collaborator

@ajkiessl Alex Kiessling (ajkiessl) left a comment

Choose a reason for hiding this comment

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

🔥 🔥 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Environment-Aware Configuration and Naming Conventions for Multi-Environment Deployments

3 participants