範例:主要版本從 1.1.1.0 升級至 1.2.0.2,其中具有自訂參數群組 - Amazon Neptune

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

範例:主要版本從 1.1.1.0 升級至 1.2.0.2,其中具有自訂參數群組

尋找您要升級的 DBCluster,以及您用來建立它的範本。例如:

Description: Base Template to create Neptune Stack with Engine Version 1.1.1.0 using custom Parameter Groups Parameters: DbInstanceType: Description: Neptune DB instance type Type: String Default: db.r5.large Resources: NeptuneDBClusterParameterGroup: Type: 'AWS::Neptune::DBClusterParameterGroup' Properties: Name: engineupgradetestcpg Family: neptune1 Description: 'NeptuneDBClusterParameterGroup with family neptune1' Parameters: neptune_enable_audit_log: 0 NeptuneDBParameterGroup: Type: 'AWS::Neptune::DBParameterGroup' Properties: Name: engineupgradetestpg Family: neptune1 Description: 'NeptuneDBParameterGroup1 with family neptune1' Parameters: neptune_query_timeout: 20000 NeptuneDBCluster: Type: 'AWS::Neptune::DBCluster' Properties: EngineVersion: 1.1.1.0 DBClusterParameterGroupName: Ref: NeptuneDBClusterParameterGroup DependsOn: - NeptuneDBClusterParameterGroup NeptuneDBInstance: Type: 'AWS::Neptune::DBInstance' Properties: DBClusterIdentifier: Ref: NeptuneDBCluster DBInstanceClass: Ref: DbInstanceType DBParameterGroupName: Ref: NeptuneDBParameterGroup DependsOn: - NeptuneDBCluster - NeptuneDBParameterGroup Outputs: DBClusterId: Description: Neptune Cluster Identifier Value: Ref: NeptuneDBCluster
  • 在此將自訂DBClusterParameterGroup系列更新為新引擎版本所使用的系列 default.neptune1.2)。

  • 針對每個DBInstance連接至 的 DBCluster,將自訂DBParameterGroup系列更新為新引擎版本所使用的系列 (此處為 default.neptune1.2)。

  • DBInstanceParameterGroupName 屬性設定為該系列中的參數群組 (此處的 default.neptune1.2)。

  • EngineVersion 屬性從 1.1.0.0 更新為 1.2.0.2

範本應如下所示:

Description: Template to upgrade major engine version to 1.2.0.2 by modifying existing custom parameter groups Parameters: DbInstanceType: Description: Neptune DB instance type Type: String Default: db.r5.large Resources: NeptuneDBClusterParameterGroup: Type: 'AWS::Neptune::DBClusterParameterGroup' Properties: Name: engineupgradetestcpgnew Family: neptune1.2 Description: 'NeptuneDBClusterParameterGroup with family neptune1.2' Parameters: neptune_enable_audit_log: 0 NeptuneDBParameterGroup: Type: 'AWS::Neptune::DBParameterGroup' Properties: Name: engineupgradetestpgnew Family: neptune1.2 Description: 'NeptuneDBParameterGroup1 with family neptune1.2' Parameters: neptune_query_timeout: 20000 NeptuneDBCluster: Type: 'AWS::Neptune::DBCluster' Properties: EngineVersion: 1.2.0.2 DBClusterParameterGroupName: Ref: NeptuneDBClusterParameterGroup DBInstanceParameterGroupName: Ref: NeptuneDBParameterGroup DependsOn: - NeptuneDBClusterParameterGroup NeptuneDBInstance: Type: 'AWS::Neptune::DBInstance' Properties: DBClusterIdentifier: Ref: NeptuneDBCluster DBInstanceClass: Ref: DbInstanceType DBParameterGroupName: Ref: NeptuneDBParameterGroup DependsOn: - NeptuneDBCluster - NeptuneDBParameterGroup Outputs: DBClusterId: Description: Neptune Cluster Identifier Value: Ref: NeptuneDBCluster

現在,請使用 AWS CloudFormation 來執行修訂後的範本。