Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(neptune): failed to create neptune instance when specifying the db parameter group #14446

Closed
zxkane opened this issue Apr 29, 2021 · 1 comment · Fixed by #14447
Closed

(neptune): failed to create neptune instance when specifying the db parameter group #14446

zxkane opened this issue Apr 29, 2021 · 1 comment · Fixed by #14447
Assignees
Labels
@aws-cdk/aws-neptune Related Amazon Neptune bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@zxkane
Copy link
Contributor

zxkane commented Apr 29, 2021

create a cluster with custom parameter group, the deployment will fail due to the below error,

DBParameterGroup not found: dbparamgroupf0cbd6d8-2oitmnxmdrlt (Service: AmazonNeptune; Status Code: 404; Error Code: DBParameterGroupNotFound; Request ID: f0031762-fc7d-4c1f-9a89-c993fa0ff406; Proxy: null)

it’s caused the incorrect L1(CfnDBClusterParameterGroup) is used by ParameterGroup

export class ParameterGroup extends Resource implements IParameterGroup {
/**
* Imports a parameter group
*/
public static fromParameterGroupName(scope: Construct, id: string, parameterGroupName: string): IParameterGroup {
class Import extends Resource implements IParameterGroup {
public readonly parameterGroupName = parameterGroupName;
}
return new Import(scope, id);
}
/**
* The name of the parameter group
*/
public readonly parameterGroupName: string;
constructor(scope: Construct, id: string, props: ParameterGroupProps) {
super(scope, id);
const resource = new CfnDBClusterParameterGroup(this, 'Resource', {
name: props.parameterGroupName,
description: props.description || 'Instance parameter group for neptune db instances',
family: 'neptune1',
parameters: props.parameters,
});

Reproduction Steps

create a cluster like below with custom DB parameter group

    const clusterPort = 8182;
    const clusterParams = new ClusterParameterGroup(this, 'ClusterParams', {
      description: 'Cluster parameter group',
      parameters: {
        neptune_enable_audit_log: '1',
        neptune_streams: '1',
      },
    });

    const dbParams = new ParameterGroup(this, 'DBParamGroup', {
      description: 'Neptune DB Param Group',
      parameters: {
        neptune_query_timeout: '600000',
      },
    });

    const neptuneRole = new Role(this, 'NeptuneBulkLoadRole', {
      assumedBy: new ServicePrincipal('rds.amazonaws.com'),
      inlinePolicies: {
        kms: new PolicyDocument({
          statements: [
            new PolicyStatement({
              actions: [
                'kms:Decrypt',
              ],
              resources: ['*'],
            }),
          ],
        }),
      },
    });
    const neptuneLoadObjectPrefix = `${dataPrefix}neptune/bulk-load`;
    bucket.grantRead(neptuneRole, `${neptuneLoadObjectPrefix}/*`);

    const graphDBCluster = new DatabaseCluster(this, 'TransactionGraphCluster', {
      vpc,
      instanceType: InstanceType.of(_instanceType),
      clusterParameterGroup: clusterParams,
      parameterGroup: dbParams,
      associatedRoles: [neptuneRole],
      iamAuthentication: true,
      storageEncrypted: true,
      port: clusterPort,
      vpcSubnets: {
        subnetType: SubnetType.PRIVATE,
      },
      instances: 1 + replicaCount,
      removalPolicy: RemovalPolicy.DESTROY,
      backupRetention: Duration.days(7),
    });

What did you expect to happen?

the cluster and instances can be created

What actually happened?

the neptune instance can not be created, and the stack is rollback

Environment

  • CDK CLI Version : v1.101.0
  • Framework Version:
  • Node.js Version:
  • OS :
  • Language (Version):

Other


This is 🐛 Bug Report

@zxkane zxkane added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 29, 2021
@github-actions github-actions bot added the @aws-cdk/aws-neptune Related Amazon Neptune label Apr 29, 2021
@mergify mergify bot closed this as completed in #14447 Apr 29, 2021
mergify bot pushed a commit that referenced this issue Apr 29, 2021
closes #14446 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

john-tipper pushed a commit to john-tipper/aws-cdk that referenced this issue May 10, 2021
closes aws#14446 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
closes aws#14446 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-neptune Related Amazon Neptune bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants