Please either support the (single account) TEST_AWS_ACCOUNT_ID overrride that was removed from v2, or provide a way to silence the production creds warning that was added in v2.

In v1, my localstack init/ready.d scripts created resources using the default 0 id, my client services used genuine test accounts, and my localstack v1 logs were clean.

In v2, my localstack v2 logs are full of production creds warnings.

I'm running several services in an e2e test and using localstack to stub only a _subset_ of the AWS services. The services under test are using genuine AWS test account creds in a test cluster.

In this scenario, I don't want the services under test to need to know if they're communicating with a real AWS service (e.g., SSM Parameter Store) or a Localstack emulation (e.g., S3). They shouldn't need to switch creds depending on where their request is sent. That would require the code-under-test to be test-aware, which would result in a different code path being taken during testing.

This mixed-service e2e test worked fine up until now, but now in v2, my localstack logs are spammed with warnings about ignoring production creds.

I tried the new PARITY_AWS_ACCESS_KEY_ID config (v2.1), but then localstack uses the real id instead of the default id, and this results in a mismatch between the resources created with the default id in the init script, and those referenced using a real id during testing. This result is worse than having the logs filled with warnings.

_Originally posted by @joebowbeer in https://github.com/localstack/localstack/issues/8225#issuecomment-1536429238_
            
"Char at index 12 not from base32 alphabet. Falling back to default id: %s",
            DEFAULT_AWS_ACCOUNT_ID,
        )
        return DEFAULT_AWS_ACCOUNT_ID
    if account_id < 0 or account_id > 999999999999:
        LOG.warning(
            "Extracted account id not between 000000000000 and 999999999999. Falling back to default id: %s",
            DEFAULT_AWS_ACCOUNT_ID,
        )
        return DEFAULT_AWS_ACCOUNT_ID
    return f"{account_id:012}"
def get_account_id_from_access_key_id(access_key_id: str) -> str:
    """Return the Account ID associated the Access Key ID."""
    
    if re.match(r"\d{12}", access_key_id):
        return access_key_id
    elif len(access_key_id) >= 20:
        if not config.PARITY_AWS_ACCESS_KEY_ID:
            
            if access_key_id.startswith("ASIA") or access_key_id.startswith("AKIA"):
                LOG.warning(
                    "Ignoring production AWS credentials provided to LocalStack. Falling back to default account ID."
                )
            elif access_key_id.startswith("LSIA") or access_key_id.startswith("LKIA"):
                return extract_account_id_from_access_key_id(access_key_id)
        else:
            if access_key_id.startswith("ASIA") or access_key_id.startswith("AKIA"):
                return extract_account_id_from_access_key_id(access_key_id)
    return DEFAULT_AWS_ACCOUNT_ID