> For the complete documentation index, see [llms.txt](https://help.cloudstoragesec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.cloudstoragesec.com/release-notes/coming-soon-v10/v10-custom-resource-naming-and-prefix-parameter-migration.md). Agents can also search and read this documentation through its [MCP server](https://help.cloudstoragesec.com/~gitbook/mcp).

# v10 Custom Resource Naming & Prefix Parameter Migration

Starting in version 10.000, the Console CloudFormation Template (CFT) consolidates 76 individual resource-naming prefix parameters (e.g., `ClusterPrefix, ApiAgentTaskPrefix, CrossAccountRolePrefix`) into two unified parameters:

1. **`ResourceNamePrefix`**: Sets a global custom prefix across standard deployment resources.
2. **`ResourceNameOverrides`**: Sets specific prefixes for individual resources or stateful services via a single delimited string.

This change resolves AWS CloudFormation’s 200-parameter template limit, freeing up capacity for upcoming product capabilities while continuing to support every custom naming pattern available previously.

{% hint style="danger" %}
Important Safety Note: If you previously modified any `*Prefix` parameter and upgrade your stack manually (via the AWS Management Console, AWS CLI, or CI/CD/Terraform pipelines), you must migrate those values to the two new parameters during the update. Upgrading manually without these parameters will cause CloudFormation to fall back to default resource names and replace your existing resources.
{% endhint %}

### Do I Need to Take Action?

| Current Naming Configuration                                                                                                     | Upgrading via Console UI (Updates Menu)                             | Upgrading Manually (AWS Console, CLI, CI/CD)                                                            |
| -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Default Names (Never modified any `*Prefix` parameters)                                                                          | No action required.                                                 | No action required. Leave both new parameters at their default values.                                  |
| Uniform Custom Prefix (Every prefix replaced `CloudStorageSec` with the same string, e.g., `Acme`)                               | No action required. The Console migrates your prefix automatically. | Action required. Set `ResourceNamePrefix` to your custom prefix. Leave `ResourceNameOverrides` empty.   |
| Selective / Unique Custom Prefixes (Only specific resources were changed, or prefixes differ)                                    | No action required. The Console migrates all values automatically.  | Action required. Populate `ResourceNameOverrides` with your custom prefixes formatted as a JSON object. |
| Customized Stateful or Cross-Account Names (Changed DynamoDB, S3 bucket, SSM, Load Balancer, or Cross-Account/Org role prefixes) | No action required. The Console migrates all values automatically.  | Action required. Add each custom value to `ResourceNameOverrides`.                                      |

### How the New Parameters Work

Each generated resource name follows the format: \[`Prefix`] + \[`7-Character Application ID`] (e.g., `CloudStorageSecCluster-a1b2c3d`).

#### 1. ResourceNamePrefix

* Default: `CloudStorageSec`
* Allowed Values: 1 to 19 characters (letters, numbers, hyphens; must start with an alphanumeric character).
* Behavior: Replaces CloudStorageSec at the beginning of standard resource names. For example, setting this to `Acme` transforms `CloudStorageSecCluster-` into `AcmeCluster-`.

#### 2. ResourceNameOverrides

* Default: "`{}`" (Empty JSON object)
* Allowed Values: Up to 4,096 characters, valid JSON object format containing `Key:Value` string pairs.
* Format: Valid JSON object where the Key is the legacy parameter name and the Value is your custom prefix:

```
{"ClusterPrefix":"MyCluster-","ApiAgentTaskPrefix":"MyApiAgent-"}
```

* Behavior: Any override defined in `ResourceNameOverrides` always takes precedence over `ResourceNamePrefix`.

#### Resources That Require ResourceNameOverrides

Most standard compute and application resources automatically adopt whatever value you pass into `ResourceNamePrefix`. However, the resources listed below are intentionally excluded from that global prefix; either to protect persisted data, comply with AWS formatting rules (such as lowercase S3 bucket naming), or prevent breaking existing trust relationships across linked accounts. If you need to customize any of these specific resources, you must explicitly declare them in `ResourceNameOverrides` using their legacy parameter key:

* DynamoDB Tables: `DynamoTableNamePrefix`
* S3 Buckets: `QuarantineBucketNamePrefix, ApplicationBucketNamePrefix`
* SSM Parameters: `ParametersPrefix`
* Console Load Balancer: `LoadBalancerPrefix`
* Cross-Account & AWS Organizations Roles/Policies: `CrossAccountRolePrefix, CrossAccountPolicyPrefix, CrossAccountEventBridgeRolePrefix, CrossAccountEventBridgePolicyPrefix, OrganizationsRolePrefix, OrganizationsPolicyPrefix`

### Upgrading via the Console UI

Prerequisite: Update your Console to the latest v9.14 release before upgrading to v10.000. The automated migration logic is handled by the running Console application, and earlier versions will not display the v10.000 update in the Updates menu.

If you initiate stack updates directly through the Console web interface (Updates menu), the upgrade is completely automated:

1. The application reads all existing `*Prefix` values from your active stack.
2. It sets `ResourceNamePrefix` to your global prefix (or `CloudStorageSec` if default).
3. Any unique, granular, or stateful prefixes are converted into a formatted JSON object inside `ResourceNameOverrides`.
4. The template updates with zero naming drift or resource replacement.

Safety Interlock: If an existing prefix contains characters unsupported by the new template (such as spaces), the Console will abort the update prior to modifying your stack or agents, displaying an error with the affected parameters. If encountered, contact Support to remediate the formatting.

### Upgrading Manually (AWS Console, CLI, or CI/CD)

If you manage CloudFormation updates outside the Console UI, use one of the two options below to determine your parameter values.

#### Option A: Automated Migration (Recommended)

Use our migration helper script to inspect your running stack and automatically generate the exact parameter values and change set configuration required by the new template.

```bash
# 1. Save the script as resource_name_overrides.sh and make it executable:
chmod +x resource_name_overrides.sh

# 2a. Direct Run (Standard): Runs directly against your stack via AWS CLI:
./resource_name_overrides.sh \
  --stack-name <your-console-stack> \
  --region <aws-region> \
  --parameters-file parameters.json

# 2b. Offline Run (Alternative): If your environment cannot call AWS directly:
# First, export your parameters:
aws cloudformation describe-stacks --stack-name <your-console-stack> \
  --query 'Stacks[0].Parameters[].[ParameterKey,ParameterValue]' \
  --output text > stack-parameters.txt

# Then run the script against the saved file:
./resource_name_overrides.sh \
  --input-file stack-parameters.txt \
  --parameters-file parameters.json

```

{% hint style="warning" %}
(Note: The `--parameters-file` flag automatically populates `ResourceNamePrefix` and `ResourceNameOverrides` with your required values while setting `"UsePreviousValue": true` for every other non-naming parameter in your stack.)
{% endhint %}

{% code expandable="true" %}

```bash
#!/usr/bin/env bash
#
# Prints the ResourceNamePrefix and ResourceNameOverrides values for a Console stack that still uses the former
# per-resource *Prefix parameters, so that a manual stack update keeps every resource name.
#
# It applies the same rules as the Console's automatic update (ResourceNamePrefixMigration.cs):
#   - ResourceNamePrefix    = the prefix that reproduces most of the current values (CloudStorageSec for defaults)
#   - ResourceNameOverrides = every current value that prefix does not reproduce, keyed by the former parameter name
#
# Only needs bash, awk and the AWS CLI (no jq). Works in AWS CloudShell, Linux, macOS and Git Bash.
#
# Examples:
#   ./resource_name_overrides.sh --stack-name my-console-stack --region us-east-1
#   ./resource_name_overrides.sh --stack-name my-console-stack --parameters-file parameters.json
#
#   # Offline: save the parameters first, then read them from the file
#   aws cloudformation describe-stacks --stack-name my-console-stack \
#     --query 'Stacks[0].Parameters[].[ParameterKey,ParameterValue]' --output text > stack-parameters.txt
#   ./resource_name_overrides.sh --input-file stack-parameters.txt

set -euo pipefail

usage() {
    cat <<'USAGE'
Usage: resource_name_overrides.sh (--stack-name NAME | --input-file FILE) [options]

  -s, --stack-name NAME        Name or ID of the Console CloudFormation stack.
  -i, --input-file FILE        Read the parameters from FILE instead of calling AWS. FILE is the output of:
                               aws cloudformation describe-stacks --stack-name NAME
                                 --query 'Stacks[0].Parameters[].[ParameterKey,ParameterValue]' --output text
  -r, --region REGION          AWS region of the stack. Defaults to the CLI's configured region.
  -p, --profile PROFILE        AWS CLI profile. Defaults to the CLI's default profile.
  -o, --parameters-file FILE   Also write a change set parameters file (for --parameters file://FILE) with both
                               new values and UsePreviousValue for every other current parameter.
  -h, --help                   Show this help.
USAGE
}

STACK_NAME=""
INPUT_FILE=""
REGION=""
PROFILE=""
PARAMETERS_FILE=""

require_value() {
    if [ "$#" -lt 2 ] || [ -z "$2" ]; then
        echo "Missing value for $1" >&2
        usage >&2
        exit 1
    fi
}

while [ "$#" -gt 0 ]; do
    case "$1" in
        -s|--stack-name)      require_value "$@"; STACK_NAME="$2"; shift 2 ;;
        -i|--input-file)      require_value "$@"; INPUT_FILE="$2"; shift 2 ;;
        -r|--region)          require_value "$@"; REGION="$2"; shift 2 ;;
        -p|--profile)         require_value "$@"; PROFILE="$2"; shift 2 ;;
        -o|--parameters-file) require_value "$@"; PARAMETERS_FILE="$2"; shift 2 ;;
        -h|--help)            usage; exit 0 ;;
        *)                    echo "Unknown argument: $1" >&2; usage >&2; exit 1 ;;
    esac
done

if [ -z "$STACK_NAME" ] && [ -z "$INPUT_FILE" ]; then
    echo "Specify --stack-name or --input-file." >&2
    usage >&2
    exit 1
fi

# Former parameter, how the template now resolves it, and the value it uses:
#   suffix  -> ${ResourceNamePrefix}<value>
#   bare    -> <value> when ResourceNamePrefix is CloudStorageSec, ${ResourceNamePrefix}<value> otherwise
#   fixed   -> always <value> (the former default); only ResourceNameOverrides changes it
# Mirrors CloudStorageScanConsole/.../Models/Updates/ResourceNamePrefixMigration.cs.
LEGACY_PARAMETERS=$(cat <<'TABLE'
AgentSecurityGroupPrefix             suffix AgentSecurityGroup-
AgentTaskPolicyPrefix                suffix AgentPolicy-
AgentTaskRolePrefix                  suffix AgentRole-
ApiAgentServicePrefix                suffix ApiAgentService-
ApiAgentTaskPrefix                   suffix ApiAgent-
ApiCpuScalingPolicyPrefix            bare   ApiServiceCpuScaling-
ApiLoadBalancerPrefix                suffix ApiLB-
ApiRequestScalingPolicyPrefix        bare   ApiServiceRequestScaling-
ApiTargetGroupPrefix                 suffix ApiTG-
AppConfigApplicationPrefix           suffix -
AppConfigDeploymentStrategyPrefix    suffix ConfigDeploy-
AppConfigDocumentPolicyPrefix        bare   AppConfigAgentConfigurationDocumentPolicy-
AppConfigDocumentPrefix              suffix Config-
AppConfigDocumentRolePrefix          bare   AppConfigAgentConfigurationDocumentRole-
AppConfigEnvironmentPrefix           suffix Env-
ApplicationBucketNamePrefix          fixed  cloudstoragesec-
ClusterPrefix                        suffix Cluster-
ConsoleSecurityGroupPrefix           suffix ConsoleSecurityGroup-
ConsoleTaskPolicyPrefix              suffix ConsolePolicy-
ConsoleTaskRolePrefix                suffix ConsoleRole-
CrossAccountEventBridgePolicyPrefix  fixed  CloudStorageSecEventBridgePolicy-
CrossAccountEventBridgeRolePrefix    fixed  CloudStorageSecEventBridgeRole-
CrossAccountPolicyPrefix             fixed  CloudStorageSecRemotePolicy-
CrossAccountRolePrefix               fixed  CloudStorageSecRemoteRole-
DcEbsAgentTaskPrefix                 suffix Agent-EBS-DC-
DcEventAgentServicePrefix            suffix AgentService-DC-
DcEventAgentTaskPrefix               suffix Agent-DC-
DcEventBasedScanQueuePrefix          suffix Queue-DC-
DecreaseAgentsScalingPolicyPrefix    bare   DecreaseAgents-
DecreaseDcAgentsScalingPolicyPrefix  bare   DecreaseAgents-DC-
DynamoTableNamePrefix                fixed  7-character-application-id.
EbsAgentTaskPrefix                   suffix Agent-EBS-
EbsScanSecurityGroupPrefix           suffix EBSScan-
Ec2ContainerPolicyPrefix             suffix Ec2ContainerPolicy-
Ec2ContainerRolePrefix               suffix Ec2ContainerRole-
Ec2ScanTaskPrefix                    suffix -EC2Scan-
EfsAgentServicePrefix                suffix EfsAgentService-
EfsAgentTaskPrefix                   suffix Agent-EFS-
EfsScanQueuePrefix                   suffix Queue-EFS-
EfsScanSecurityGroupPrefix           suffix EFSScan-
EventAgentServicePrefix              suffix AgentService-
EventAgentTaskPrefix                 suffix Agent-
EventBasedScanQueuePrefix            suffix Queue-
EventBasedScanTopicPrefix            suffix Topic-
ExecutionRolePrefix                  suffix ExecutionRole-
FsxScanQueuePrefix                   suffix Queue-FSx-
FsxScanSecurityGroupPrefix           suffix FSxScan-
IncreaseAgentsScalingPolicyPrefix    bare   IncreaseAgents-
IncreaseDcAgentsScalingPolicyPrefix  bare   IncreaseAgents-DC-
LargeDcEventQueueAlarmPrefix         suffix LargeQueue-DC-
LargeEventQueueAlarmPrefix           suffix LargeQueue-
LargeFileAgentTaskPrefix             suffix LargeFileAgent-
LoadBalancerGroupPrefix              suffix LBSecurityGroup-
LoadBalancerPrefix                   fixed  CloudStorageSecLB-
NotificationsTopicPrefix             suffix NotificationsTopic-
OrganizationsPolicyPrefix            fixed  CloudStorageSecOrganizationsPolicy-
OrganizationsRolePrefix              fixed  CloudStorageSecOrganizationsRole-
ParametersPrefix                     fixed  CloudStorageSecConsole-
QuarantineBucketNamePrefix           fixed  cloudstoragesecquarantine-
RemoveRetroAgentsScalingPolicyPrefix bare   RemoveRetroAgents-
RetroAgentServicePrefix              suffix RetroAgentService-
RetroAgentTaskPrefix                 suffix RetroAgent-
RetroQueueEmptyAlarmPrefix           suffix RetroQueueEmpty-
RetroQueueNotEmptyAlarmPrefix        suffix RetroQueueNotEmpty-
RetroScanQueuePrefix                 suffix RetroQueue-
ScannedItemsQueuePrefix              suffix Queue-ScannedItems-
ServicePrefix                        suffix ConsoleService-
SetRetroAgentsScalingPolicyPrefix    bare   SetRetroAgents-
SmallDcEventQueueAlarmPrefix         suffix SmallQueue-DC-
SmallEventQueueAlarmPrefix           suffix SmallQueue-
TargetGroupPrefix                    suffix TG-
TaskDefinitionPrefix                 suffix Console-
UserPoolClientPrefix                 suffix UserPoolClient-
UserPoolPolicyPrefix                 suffix UserPoolPolicy-
UserPoolPrefix                       suffix UserPool-
UserPoolRolePrefix                   suffix UserPoolRole-
TABLE
)

read_stack_parameters() {
    if [ -n "$INPUT_FILE" ]; then
        cat "$INPUT_FILE"
        return
    fi

    local aws_args=(cloudformation describe-stacks --stack-name "$STACK_NAME"
        --query 'Stacks[0].Parameters[].[ParameterKey,ParameterValue]' --output text)
    if [ -n "$REGION" ]; then aws_args+=(--region "$REGION"); fi
    if [ -n "$PROFILE" ]; then aws_args+=(--profile "$PROFILE"); fi
    aws "${aws_args[@]}"
}

STACK_PARAMETERS=$(read_stack_parameters)

{
    printf '%s\n' "$LEGACY_PARAMETERS"
    echo "@@STACK@@"
    printf '%s\n' "$STACK_PARAMETERS"
} | LC_ALL=C PARAMETERS_FILE="$PARAMETERS_FILE" awk -v sq="'" '
function ends_with(s, suffix) {
    return length(s) >= length(suffix) && substr(s, length(s) - length(suffix) + 1) == suffix
}

# The ResourceNamePrefix that would reproduce value v for parameter k, or "".
function candidate(k, v,    d, c) {
    d = legacy_value[k]
    if (legacy_kind[k] == "suffix")
        return (length(v) > length(d) && ends_with(v, d)) ? substr(v, 1, length(v) - length(d)) : ""
    if (v == d)
        return DEFAULT
    c = (length(v) > length(d) && ends_with(v, d)) ? substr(v, 1, length(v) - length(d)) : ""
    return c == DEFAULT ? "" : c
}

# The prefix the template resolves for parameter k when it has no override.
function resolved(k, prefix) {
    if (legacy_kind[k] == "fixed")  return legacy_value[k]
    if (legacy_kind[k] == "suffix") return prefix legacy_value[k]
    return prefix == DEFAULT ? legacy_value[k] : prefix legacy_value[k]
}

function valid_prefix(c) {
    return length(c) <= MAX_PREFIX_LENGTH && c ~ /^[A-Za-z0-9][A-Za-z0-9-]*$/
}

function json_string(s) {
    gsub(/\\/, "\\\\", s)
    gsub(/"/, "\\\"", s)
    return "\"" s "\""
}

BEGIN {
    # From the environment rather than -v, which would interpret backslashes in Windows paths.
    parameters_file = ENVIRON["PARAMETERS_FILE"]
    DEFAULT = "CloudStorageSec"
    MAX_PREFIX_LENGTH = 19
    in_stack = 0
    legacy_count = 0
    stack_count = 0
}

{ sub(/\r$/, "") }

$0 == "@@STACK@@" { in_stack = 1; next }

!in_stack {
    if (NF < 3 || substr($1, 1, 1) == "#") next
    legacy_count++
    legacy_name[legacy_count] = $1
    legacy_kind[$1] = $2
    legacy_value[$1] = $3
    next
}

{
    tab = index($0, "\t")
    key = tab ? substr($0, 1, tab - 1) : $0
    value = tab ? substr($0, tab + 1) : ""
    if (key == "") next
    stack_count++
    stack_key[stack_count] = key
    current[key] = value
}

END {
    if ("ResourceNamePrefix" in current) {
        print "This stack already uses ResourceNamePrefix; there is nothing to convert."
        print "ResourceNamePrefix: " current["ResourceNamePrefix"]
        print "ResourceNameOverrides: " (("ResourceNameOverrides" in current) ? current["ResourceNameOverrides"] : "{}")
        exit 0
    }

    # ResourceNamePrefix = the valid candidate that reproduces the most values; the default wins ties.
    found = 0
    for (i = 1; i <= legacy_count; i++) {
        k = legacy_name[i]
        if (!(k in current)) continue
        found++
        if (legacy_kind[k] == "fixed") continue
        c = candidate(k, current[k])
        if (c != "" && valid_prefix(c)) votes[c]++
    }
    prefix = DEFAULT
    best = 0
    for (c in votes) {
        if (votes[c] > best || (votes[c] == best && c != prefix && (c == DEFAULT || (prefix != DEFAULT && c < prefix)))) {
            prefix = c
            best = votes[c]
        }
    }

    # ResourceNameOverrides = every value that prefix does not reproduce (table order is sorted by name).
    overrides = ""
    override_count = 0
    invalid_count = 0
    for (i = 1; i <= legacy_count; i++) {
        k = legacy_name[i]
        if (!(k in current) || current[k] == resolved(k, prefix)) continue
        override_count++
        override_line[override_count] = "  " k " = " sq current[k] sq
        overrides = overrides (overrides == "" ? "" : ",") "\"" k "\":\"" current[k] "\""
        if (current[k] !~ /^[A-Za-z0-9_.@+=,\/-]+$/) {
            invalid_count++
            invalid_line[invalid_count] = override_line[override_count]
        }
    }
    overrides = "{" overrides "}"

    if (invalid_count > 0) {
        print "These prefixes contain characters ResourceNameOverrides does not accept (allowed: letters, numbers and . _ - @ + = , /). Contact support before updating:" > "/dev/stderr"
        for (i = 1; i <= invalid_count; i++) print invalid_line[i] > "/dev/stderr"
        exit 2
    }

    print "Read " found " former prefix parameters; " override_count " need an override." > "/dev/stderr"
    for (i = 1; i <= override_count; i++) print override_line[i] > "/dev/stderr"

    print "ResourceNamePrefix: " prefix
    print "ResourceNameOverrides: " overrides

    if (parameters_file != "") {
        printf "[\n  {\"ParameterKey\": \"ResourceNamePrefix\", \"ParameterValue\": %s},\n", json_string(prefix) > parameters_file
        printf "  {\"ParameterKey\": \"ResourceNameOverrides\", \"ParameterValue\": %s}", json_string(overrides) > parameters_file
        for (i = 1; i <= stack_count; i++) {
            k = stack_key[i]
            if ((k in legacy_kind) || k == "ResourceNameOverrides") continue
            printf ",\n  {\"ParameterKey\": %s, \"UsePreviousValue\": true}", json_string(k) > parameters_file
        }
        printf "\n]\n" > parameters_file
        close(parameters_file)
        print "Wrote change set parameters to " parameters_file > "/dev/stderr"
    }
}
'

```

{% endcode %}

#### Option B: Manual Identification & Migration

If you prefer to manually construct your parameter values without running the script, follow these steps:

**Step 1: Inspect Your Current Prefixes**

Query your active CloudFormation stack for all legacy prefix parameters:

```bash
aws cloudformation describe-stacks \
--stack-name <your-console-stack> \
--query "Stacks[0].Parameters[?ends_with(ParameterKey, 'Prefix')]" \
--output table
```

(Reference: Compare your output values against the Legacy Parameter Reference Table below to identify which values deviate from defaults.)

**Step 2: Determine ResourceNamePrefix**

* If all your customized prefixes replaced `CloudStorageSec` with a single company name (e.g., `Acme`), set: `ResourceNamePrefix = Acme`
* If prefixes vary across resources, set: `ResourceNamePrefix = CloudStorageSec`

**Step 3: Construct ResourceNameOverrides**

Assemble any custom values not covered by `ResourceNamePrefix` into a JSON string (`{"Key":"Value"}`). Remember to include any custom DynamoDB, S3, SSM, Load Balancer, or Cross-Account IAM role prefixes, as these never follow the global prefix:

```json
{"ClusterPrefix":"MyCluster-","CrossAccountRolePrefix":"AcmeRemote-","QuarantineBucketNamePrefix":"acmequarantine-"}
```

**Step 4: Prepare the Parameters JSON File**

When updating via the AWS CLI or automated pipelines, pass your parameters using a JSON file. Because `ResourceNameOverrides` is a JSON object itself, pass it as a JSON-encoded string:

```json
[
  {
    "ParameterKey": "ResourceNamePrefix",
    "ParameterValue": "Acme"
  },
  {
    "ParameterKey": "ResourceNameOverrides",
    "ParameterValue": "{\\"ClusterPrefix\\":\\"MyCluster-\\",\\"CrossAccountRolePrefix\\":\\"AcmeRemote-\\"}"
  },
  {
    "ParameterKey": "Email",
    "UsePreviousValue": true
  }
]
```

(Ensure all other non-prefix parameters from your stack are listed with `"UsePreviousValue": true` so they do not reset to defaults. Do not pass legacy `*Prefix` parameters, as they no longer exist in the template.)

**Step 5: Create and Inspect a Change Set (Mandatory Verification)**

Always generate and inspect a CloudFormation Change Set before applying changes:

```bash
# 1. Create the Change Set
aws cloudformation create-change-set \
--stack-name <your-console-stack> \
--change-set-name resource-naming-migration \
--template-url <template-url-for-this-release> \
--parameters file://parameters.json \
--capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM

# 2. Verify that NO resources will be replaced
aws cloudformation describe-change-set \
--stack-name <your-console-stack> \
--change-set-name resource-naming-migration \
--query "Changes[?ResourceChange.Replacement=='True'].ResourceChange.LogicalResourceId"
```

⚠️ Verification Check: The query above must return an empty list (\[]). If any resource displays `Replacement: True`, an override was omitted or misspelled. Do not execute the change set. Delete it, correct your parameter values, and recreate the change set.

**Step 6: Execute the Update**

Once the Change Set verifies 0 replacements, apply the update:

```bash
aws cloudformation execute-change-set \
  --stack-name <your-console-stack> \
  --change-set-name resource-naming-migration
```

### New Deployments

For greenfield deployments, both parameters are located in the Optional AWS Resource Renaming section of the template parameters.

| Deployment Goal                               | ResourceNamePrefix | ResourceNameOverrides                                                                                    |
| --------------------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------- |
| Default Naming                                | CloudStorageSec    | Empty                                                                                                    |
| Global Company Prefix (e.g., Acme)            | Acme               | Empty                                                                                                    |
| Global Prefix + Custom S3 Buckets             | Acme               | <p>{"QuarantineBucketNamePrefix":"acmequarantine-","ApplicationBucketNamePrefix":"acme-"}</p><p><br></p> |
| Default Naming with Single Resource Exception | CloudStorageSec    | {"ApiLoadBalancerPrefix":"MyApiLB-"}                                                                     |

Note: S3 bucket names must be lowercase. Load balancer and target group names cannot exceed 32 characters, including the 7-character application ID suffix.

### Troubleshooting

| Symptom                                                                                    | Cause                                                                                                                                  | Remediation                                                                                                                                                                                |
| ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p>Console update fails:<br>Console update blocked to avoid replacing AWS resources...</p> | A legacy prefix contains characters rejected by the new parser (e.g., spaces).                                                         | No stack changes were made. Contact Support with the parameter list provided in the error message to adjust the prefix values.                                                             |
| <p>CLI error:<br>Parameters: \[ClusterPrefix] do not exist in the template</p>             | The CLI command or parameters file still passes retired legacy `*Prefix` parameters.                                                   | Remove all legacy `*Prefix` parameters from your command/file and supply values via ResourceNamePrefix and `ResourceNameOverrides`.                                                        |
| <p>CloudFormation rejects parameter:<br>Must be a valid JSON object string...</p>          | `ResourceNameOverrides` is not valid JSON (e.g., missing curly braces, unquoted keys, trailing commas, or invalid characters).         | Ensure the parameter is formatted as a valid JSON object string (e.g., `{"ClusterPrefix":"MyCluster-"}`). Allowed characters within values: letters, numbers, and .\_-+=,@/.               |
| Override has no effect                                                                     | The parameter key in ResourceNameOverrides is misspelled or does not match a valid legacy parameter name.                              | Check the key name against the[ ](https://www.google.com/search?q=%23legacy-parameter-reference-table)Reference Table below. The Console logs warnings for unrecognized keys upon startup. |
| Change Set indicates Replacement: True                                                     | A previously customized prefix was omitted from the new parameters, causing CloudFormation to revert the resource to its default name. | Do not execute the change set. Delete the change set, append the missing parameter override to `ResourceNameOverrides`, and generate a new change set.                                     |

### Legacy Parameter Reference Table

Use the Legacy Parameter Key column as the key when specifying overrides in `ResourceNameOverrides`. “Follows ResourceNamePrefix” indicates whether setting `ResourceNamePrefix=<prefix>` automatically applies `<prefix>` to that resource when no override is present.

| Legacy Parameter Key                 | Default Prefix                             | Follows ResourceNamePrefix?             |
| ------------------------------------ | ------------------------------------------ | --------------------------------------- |
| AgentSecurityGroupPrefix             | CloudStorageSecAgentSecurityGroup-         | Yes (as \<prefix>AgentSecurityGroup-)   |
| AgentTaskPolicyPrefix                | CloudStorageSecAgentPolicy-                | Yes (as \<prefix>AgentPolicy-)          |
| AgentTaskRolePrefix                  | CloudStorageSecAgentRole-                  | Yes (as \<prefix>AgentRole-)            |
| ApiAgentServicePrefix                | CloudStorageSecApiAgentService-            | Yes (as \<prefix>ApiAgentService-)      |
| ApiAgentTaskPrefix                   | CloudStorageSecApiAgent-                   | Yes (as \<prefix>ApiAgent-)             |
| ApiCpuScalingPolicyPrefix            | ApiServiceCpuScaling-                      | Yes (when not CloudStorageSec)          |
| ApiLoadBalancerPrefix                | CloudStorageSecApiLB-                      | Yes (as \<prefix>ApiLB-)                |
| ApiRequestScalingPolicyPrefix        | ApiServiceRequestScaling-                  | Yes (when not CloudStorageSec)          |
| ApiTargetGroupPrefix                 | CloudStorageSecApiTG-                      | Yes (as \<prefix>ApiTG-)                |
| AppConfigApplicationPrefix           | CloudStorageSec-                           | Yes (as \<prefix>-)                     |
| AppConfigDeploymentStrategyPrefix    | CloudStorageSecConfigDeploy-               | Yes (as \<prefix>ConfigDeploy-)         |
| AppConfigDocumentPolicyPrefix        | AppConfigAgentConfigurationDocumentPolicy- | Yes (when not CloudStorageSec)          |
| AppConfigDocumentPrefix              | CloudStorageSecConfig-                     | Yes (as \<prefix>Config-)               |
| AppConfigDocumentRolePrefix          | AppConfigAgentConfigurationDocumentRole-   | Yes (when not CloudStorageSec)          |
| AppConfigEnvironmentPrefix           | CloudStorageSecEnv-                        | Yes (as \<prefix>Env-)                  |
| ApplicationBucketNamePrefix          | cloudstoragesec-                           | No (Must use override)                  |
| ClusterPrefix                        | CloudStorageSecCluster-                    | Yes (as \<prefix>Cluster-)              |
| ConsoleSecurityGroupPrefix           | CloudStorageSecConsoleSecurityGroup-       | Yes (as \<prefix>ConsoleSecurityGroup-) |
| ConsoleTaskPolicyPrefix              | CloudStorageSecConsolePolicy-              | Yes (as \<prefix>ConsolePolicy-)        |
| ConsoleTaskRolePrefix                | CloudStorageSecConsoleRole-                | Yes (as \<prefix>ConsoleRole-)          |
| CrossAccountEventBridgePolicyPrefix  | CloudStorageSecEventBridgePolicy-          | No (Must use override)                  |
| CrossAccountEventBridgeRolePrefix    | CloudStorageSecEventBridgeRole-            | No (Must use override)                  |
| CrossAccountPolicyPrefix             | CloudStorageSecRemotePolicy-               | No (Must use override)                  |
| CrossAccountRolePrefix               | CloudStorageSecRemoteRole-                 | No (Must use override)                  |
| DcEbsAgentTaskPrefix                 | CloudStorageSecAgent-EBS-DC-               | Yes (as \<prefix>Agent-EBS-DC-)         |
| DcEventAgentServicePrefix            | CloudStorageSecAgentService-DC-            | Yes (as \<prefix>AgentService-DC-)      |
| DcEventAgentTaskPrefix               | CloudStorageSecAgent-DC-                   | Yes (as \<prefix>Agent-DC-)             |
| DcEventBasedScanQueuePrefix          | CloudStorageSecQueue-DC-                   | Yes (as \<prefix>Queue-DC-)             |
| DecreaseAgentsScalingPolicyPrefix    | DecreaseAgents-                            | Yes (when not CloudStorageSec)          |
| DecreaseDcAgentsScalingPolicyPrefix  | DecreaseAgents-DC-                         | Yes (when not CloudStorageSec)          |
| DynamoTableNamePrefix                | \<application ID>.                         | No (Must use override)                  |
| EbsAgentTaskPrefix                   | CloudStorageSecAgent-EBS-                  | Yes (as \<prefix>Agent-EBS-)            |
| EbsScanSecurityGroupPrefix           | CloudStorageSecEBSScan-                    | Yes (as \<prefix>EBSScan-)              |
| Ec2ContainerPolicyPrefix             | CloudStorageSecEc2ContainerPolicy-         | Yes (as \<prefix>Ec2ContainerPolicy-)   |
| Ec2ContainerRolePrefix               | CloudStorageSecEc2ContainerRole-           | Yes (as \<prefix>Ec2ContainerRole-)     |
| Ec2ScanTaskPrefix                    | CloudStorageSec-EC2Scan-                   | Yes (as \<prefix>-EC2Scan-)             |
| EfsAgentServicePrefix                | CloudStorageSecEfsAgentService-            | Yes (as \<prefix>EfsAgentService-)      |
| EfsAgentTaskPrefix                   | CloudStorageSecAgent-EFS-                  | Yes (as \<prefix>Agent-EFS-)            |
| EfsScanQueuePrefix                   | CloudStorageSecQueue-EFS-                  | Yes (as \<prefix>Queue-EFS-)            |
| EfsScanSecurityGroupPrefix           | CloudStorageSecEFSScan-                    | Yes (as \<prefix>EFSScan-)              |
| EventAgentServicePrefix              | CloudStorageSecAgentService-               | Yes (as \<prefix>AgentService-)         |
| EventAgentTaskPrefix                 | CloudStorageSecAgent-                      | Yes (as \<prefix>Agent-)                |
| EventBasedScanQueuePrefix            | CloudStorageSecQueue-                      | Yes (as \<prefix>Queue-)                |
| EventBasedScanTopicPrefix            | CloudStorageSecTopic-                      | Yes (as \<prefix>Topic-)                |
| ExecutionRolePrefix                  | CloudStorageSecExecutionRole-              | Yes (as \<prefix>ExecutionRole-)        |
| FsxScanQueuePrefix                   | CloudStorageSecQueue-FSx-                  | Yes (as \<prefix>Queue-FSx-)            |
| FsxScanSecurityGroupPrefix           | CloudStorageSecFSxScan-                    | Yes (as \<prefix>FSxScan-)              |
| IncreaseAgentsScalingPolicyPrefix    | IncreaseAgents-                            | Yes (when not CloudStorageSec)          |
| IncreaseDcAgentsScalingPolicyPrefix  | IncreaseAgents-DC-                         | Yes (when not CloudStorageSec)          |
| LargeDcEventQueueAlarmPrefix         | CloudStorageSecLargeQueue-DC-              | Yes (as \<prefix>LargeQueue-DC-)        |
| LargeEventQueueAlarmPrefix           | CloudStorageSecLargeQueue-                 | Yes (as \<prefix>LargeQueue-)           |
| LargeFileAgentTaskPrefix             | CloudStorageSecLargeFileAgent-             | Yes (as \<prefix>LargeFileAgent-)       |
| LoadBalancerGroupPrefix              | CloudStorageSecLBSecurityGroup-            | Yes (as \<prefix>LBSecurityGroup-)      |
| LoadBalancerPrefix                   | CloudStorageSecLB-                         | No (Must use override)                  |
| NotificationsTopicPrefix             | CloudStorageSecNotificationsTopic-         | Yes (as \<prefix>NotificationsTopic-)   |
| OrganizationsPolicyPrefix            | CloudStorageSecOrganizationsPolicy-        | No (Must use override)                  |
| OrganizationsRolePrefix              | CloudStorageSecOrganizationsRole-          | No (Must use override)                  |
| ParametersPrefix                     | CloudStorageSecConsole-                    | No (Must use override)                  |
| QuarantineBucketNamePrefix           | cloudstoragesecquarantine-                 | No (Must use override)                  |
| RemoveRetroAgentsScalingPolicyPrefix | RemoveRetroAgents-                         | Yes (when not CloudStorageSec)          |
| RetroAgentServicePrefix              | CloudStorageSecRetroAgentService-          | Yes (as \<prefix>RetroAgentService-)    |
| RetroAgentTaskPrefix                 | CloudStorageSecRetroAgent-                 | Yes (as \<prefix>RetroAgent-)           |
| RetroQueueEmptyAlarmPrefix           | CloudStorageSecRetroQueueEmpty-            | Yes (as \<prefix>RetroQueueEmpty-)      |
| RetroQueueNotEmptyAlarmPrefix        | CloudStorageSecRetroQueueNotEmpty-         | Yes (as \<prefix>RetroQueueNotEmpty-)   |
| RetroScanQueuePrefix                 | CloudStorageSecRetroQueue-                 | Yes (as \<prefix>RetroQueue-)           |
| ScannedItemsQueuePrefix              | CloudStorageSecQueue-ScannedItems-         | Yes (as \<prefix>Queue-ScannedItems-)   |
| ServicePrefix                        | CloudStorageSecConsoleService-             | Yes (as \<prefix>ConsoleService-)       |
| SetRetroAgentsScalingPolicyPrefix    | SetRetroAgents-                            | Yes (when not CloudStorageSec)          |
| SmallDcEventQueueAlarmPrefix         | CloudStorageSecSmallQueue-DC-              | Yes (as \<prefix>SmallQueue-DC-)        |
| SmallEventQueueAlarmPrefix           | CloudStorageSecSmallQueue-                 | Yes (as \<prefix>SmallQueue-)           |
| TargetGroupPrefix                    | CloudStorageSecTG-                         | Yes (as \<prefix>TG-)                   |
| TaskDefinitionPrefix                 | CloudStorageSecConsole-                    | Yes (as \<prefix>Console-)              |
| UserPoolClientPrefix                 | CloudStorageSecUserPoolClient-             | Yes (as \<prefix>UserPoolClient-)       |
| UserPoolPolicyPrefix                 | CloudStorageSecUserPoolPolicy-             | Yes (as \<prefix>UserPoolPolicy-)       |
| UserPoolPrefix                       | CloudStorageSecUserPool-                   | Yes (as \<prefix>UserPool-)             |
| UserPoolRolePrefix                   | CloudStorageSecUserPoolRole-               | Yes (as \<prefix>UserPoolRole-)         |

### Need Assistance?

If you maintain complex CI/CD deployment pipelines, manage linked multi-account environments, or would like our engineering team to review your Change Set parameters prior to executing your update, please contact Support and we will be happy to assist.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.cloudstoragesec.com/release-notes/coming-soon-v10/v10-custom-resource-naming-and-prefix-parameter-migration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
