aws-samples / aws-samples/amazon-redshift-config-compare
Step function failed - Invalid type for parameter ClusterIdentifier
- Dominant language
- Python
- Stars
- 25
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Can't compare serverless cluster if using SQL_SCRIPT_S3_PATH
```
{
"errorMessage": "Parameter validation failed:\nInvalid type for parameter ClusterIdentifier, value: {'workgroup': 'workgroup-rs-128', 'namespace': 'namespace-rs-128'}, type: , valid types: ",
"errorType": "ParamValidationError",
"stackTrace": [
" File \"/var/task/RedshiftConfigTestingLambda.py\", line 201, in handler\n 'job_id': run_redshift_performance_test(\n",
" File \"/var/task/RedshiftConfigTestingLambda.py\", line 803, in run_redshift_performance_test\n desc = client.describe_clusters(ClusterIdentifier=cluster_identifier)['Clusters'][0]\n",
" File \"/opt/python/lib/python3.8/site-packages/botocore/client.py\", line 514, in _api_call\n return self._make_api_call(operation_name, kwargs)\n",
" File \"/opt/python/lib/python3.8/site-packages/botocore/client.py\", line 901, in _make_api_call\n request_dict = self._convert_to_request_dict(\n",
" File \"/opt/python/lib/python3.8/site-packages/botocore/client.py\", line 962, in _convert_to_request_dict\n request_dict = self._serializer.serialize_to_request(\n",
" File \"/opt/python/lib/python3.8/site-packages/botocore/validate.py\", line 381, in serialize_to_request\n raise ParamValidationError(report=report.generate_report())\n"
]
}
```
Failed **run_redshift_performance_test**
Input:
```
{
"redshift_cluster_index": 3,
"extract_job_id": {
"output": {
"job_id": "N/A"
}
},
"redshift_cluster_configuration": {
"TYPE": "Serverless",
"BASE_RPU": "128"
},
"what_if_timestamp": {
"output": {
"status": "2023-08-09-14-55-52"
}
},
"endpoint_type": {
"output": {
"status": "SERVERLESS"
}
},
"cluster_identifier": {
"output": {
"status": {
"workgroup": "workgroup-rs-128",
"namespace": "namespace-rs-128"
}
}
},
"step_output": {
"output": {
"status": "FINISHED"
}
},
"namespace_identifier": {
"output": {
"status": "Initiated"
}
},
"workgroup_identifier": {
"output": {
"status": "Initiated"
}
},
"restore_status": {
"output": {
"status": {
"workgroupstatus": "AVAILABLE",
"namespace_arn": "XXX"
}
}
},
"restore": {
"output": {
"status": "Initiated"
}
},
"tag_namespace": {
"output": {
"status": null
}
},
"sql_output": {
"output": {
"sql_id": "N/A"
}
}
}
```
Config:
```
{
"SNAPSHOT_ID": "rs:XXX",
"SNAPSHOT_ACCOUNT_ID": "XXX",
"PARAMETER_GROUP_CONFIG_S3_PATH": "s3://XXX/pg_config.json",
"DDL_AND_COPY_SCRIPT_S3_PATH": "N/A",
"SQL_SCRIPT_S3_PATH": "s3://XXX/querytxt.sql",
"NUMBER_OF_PARALLEL_SESSIONS_LIST": "10",
"SIMPLE_REPLAY_LOG_LOCATION": "N/A",
"SIMPLE_REPLAY_EXTRACT_START_TIME": "N/A",
"SIMPLE_REPLAY_EXTRACT_END_TIME": "N/A",
"SIMPLE_REPLAY_EXTRACT_OVERWRITE_S3_PATH": "N/A",
"SIMPLE_REPLAY_OVERWRITE_S3_PATH": "N/A",
"AUTO_PAUSE": true,
"DATABASE_NAME": "XXX",
"CONFIGURATIONS": [
{
"NODE_TYPE": "dc2.8xlarge",
"NUMBER_OF_NODES": "2",
"TYPE": "Provisioned",
"WLM_CONFIG_S3_PATH": "N/A"
},
{
"NODE_TYPE": "ra3.4xlarge",
"NUMBER_OF_NODES": "3",
"TYPE": "Provisioned",
"WLM_CONFIG_S3_PATH": "N/A"
},
{
"NODE_TYPE": "ra3.xlplus",
"NUMBER_OF_NODES": "8",
"TYPE": "Provisioned",
"WLM_CONFIG_S3_PATH": "N/A"
},
{
"TYPE": "Serverless",
"BASE_RPU": "128"
}
]
}
```
Pg config:
```
{
"Parameters": [
{
"ParameterName": "auto_analyze",
"ParameterValue": "true",
"Description": "Use auto analyze",
"Source": "engine-default",
"DataType": "boolean",
"AllowedValues": "true,false",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "auto_mv",
"ParameterValue": "true",
"Description": "Enable AutoMV",
"Source": "engine-default",
"DataType": "boolean",
"AllowedValues": "true,false",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "datestyle",
"ParameterValue": "ISO, MDY",
"Description": "Sets the display format for date and time values.",
"Source": "engine-default",
"DataType": "string",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "enable_case_sensitive_identifier",
"ParameterValue": "true",
"Description": "Preserve case sensitivity for database identifiers such as table or column names in parser",
"Source": "user",
"DataType": "boolean",
"AllowedValues": "true,false",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "enable_user_activity_logging",
"ParameterValue": "true",
"Description": "parameter for audit logging purpose",
"Source": "engine-default",
"DataType": "boolean",
"AllowedValues": "true,false",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "extra_float_digits",
"ParameterValue": "0",
"Description": "Sets the number of digits displayed for floating-point values",
"Source": "engine-default",
"DataType": "integer",
"AllowedValues": "-15-2",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "max_concurrency_scaling_clusters",
"ParameterValue": "1",
"Description": "The maximum concurrency scaling clusters can be used.",
"Source": "engine-default",
"DataType": "integer",
"AllowedValues": "0-10",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "max_cursor_result_set_size",
"ParameterValue": "default",
"Description": "Sets the max cursor result set size",
"Source": "engine-default",
"DataType": "integer",
"AllowedValues": "0-14400000",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "query_group",
"ParameterValue": "default",
"Description": "This parameter applies a user-defined label to a group of queries that are run during the same session..",
"Source": "engine-default",
"DataType": "string",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "require_ssl",
"ParameterValue": "false",
"Description": "require ssl for all databaseconnections",
"Source": "engine-default",
"DataType": "boolean",
"AllowedValues": "true,false",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "search_path",
"ParameterValue": "$user, public",
"Description": "Sets the schema search order for names that are not schema-qualified.",
"Source": "engine-default",
"DataType": "string",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "statement_timeout",
"ParameterValue": "0",
"Description": "Aborts any statement that takes over the specified number of milliseconds.",
"Source": "engine-default",
"DataType": "integer",
"AllowedValues": "0,100-2147483647",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "use_fips_ssl",
"ParameterValue": "false",
"Description": "Use fips ssl library",
"Source": "engine-default",
"DataType": "boolean",
"AllowedValues": "true,false",
"ApplyType": "static",
"IsModifiable": true
},
{
"ParameterName": "wlm_json_configuration",
"ParameterValue": "[{\"user_group\":[\"admin\"],\"query_group\":[],\"auto_wlm\":true,\"queue_type\":\"auto\",\"name\":\"High priority\",\"priority\":\"high\"},{\"user_group\":[\"lowprio\"],\"query_group\":[],\"auto_wlm\":true,\"queue_type\":\"auto\",\"name\":\"Low priority\",\"priority\":\"low\"},{\"auto_wlm\":true,\"user_group\":[],\"query_group\":[],\"name\":\"Default queue\"},{\"short_query_queue\":true}]",
"Description": "wlm json configuration",
"Source": "user",
"DataType": "string",
"ApplyType": "dynamic",
"IsModifiable": true
}
]
}
```
Contributor guide
Assessment
This issue has not been assessed yet.