env¶
- aws_config.env.validate_project_name(project_name: str)[source]¶
Validate project name follows AWS-compatible naming conventions.
Ensures project names work across AWS services and infrastructure tools. Rules enforce compatibility with S3 buckets, SSM parameters, and IAM resources.
- After_param project_name:
Project identifier to validate
- Raises:
ValueError – If name violates naming rules
- aws_config.env.normalize_parameter_name(param_name: str) str[source]¶
Normalize parameter names to comply with AWS SSM Parameter Store restrictions.
AWS SSM Parameter Store prohibits parameter names that start with “aws” or “ssm” reserved prefixes. This function automatically adds a “p-” prefix to avoid conflicts.
Why this is needed: - Prevents runtime errors when deploying parameters - Ensures consistent naming across all AWS accounts - Handles edge cases where project names might conflict with AWS reserved words
- After_param param_name:
Original parameter name
- Returns:
AWS-compliant parameter name
- Example:
“my-project” -> “my-project” (unchanged)
“aws-project” -> “p-aws-project” (prefixed)
“ssm-config” -> “p-ssm-config” (prefixed)
- Reference:
https://docs.aws.amazon.com/cli/latest/reference/ssm/put-parameter.html#options