The `aws-cdk-aws-neptune-alpha` library is the AWS Cloud Development Kit (CDK) Construct Library for AWS Neptune. It provides higher-level constructs (L2 and L3) for provisioning Amazon Neptune database clusters and instances using Python. As an 'alpha' module, its APIs are experimental and subject to non-backward compatible changes or removal in future versions, not adhering to semantic versioning. It is actively developed and released frequently as part of the broader AWS CDK project, with the current version being 2.250.0a0.
pip install aws-cdk-aws-neptune-alphaVerified import paths — ran on the pinned version, not inferred.
This quickstart deploys a basic AWS Neptune Database Cluster within a new VPC. It defines a `Vpc`, then instantiates `neptune.DatabaseCluster` with a specified instance type and engine version, and finally adds a security group rule to allow connections. The cluster's endpoint is exported as a CloudFormation output.
Refer to the release notes on the AWS CDK GitHub repository or official documentation before upgrading. Be prepared to update your code to match new API signatures or construct names.
Always pass a `vpc` property to the `DatabaseCluster` construct. Ensure the VPC has available private subnets and NAT Gateways for outbound internet access if required for engine updates or external services.
If a new engine version or instance type is released and not yet available in the enum, you can use `neptune.EngineVersion.of('your-new-version')` or `neptune.InstanceType.of('db.r6g.large')` to specify it as a string. Always check the official AWS Neptune documentation for the latest supported versions and instance types.Enable `iam_authentication=True` on your `DatabaseCluster` and use `cluster.grant_connect(iam_role)` to grant connection permissions to specific IAM roles or users. Ensure your application's IAM role has the necessary `neptune-db:connect` permissions.
Run `pip install aws-cdk-aws-neptune-alpha` in your virtual environment. Ensure your `requirements.txt` includes this package and you've run `pip install -r requirements.txt`.
Consult the release notes or the latest API documentation for the `aws-cdk-aws-neptune-alpha` version you are using. Update your code to reflect the current API. Consider pinning your `aws-cdk-aws-neptune-alpha` version if stability is critical.
Verify the selected `neptune.InstanceType` and `neptune.EngineVersion` against the official AWS Neptune documentation for your chosen AWS region. Ensure your VPC has sufficient available AZs that support the instance type.
Attach an IAM policy to the deploying user/role that grants permissions like `neptune:CreateDBCluster`, `neptune:DeleteDBCluster`, `neptune:ModifyDBCluster`, `neptune:CreateDBInstance`, `ec2:CreateSecurityGroup`, etc., or use the `AdministratorAccess` managed policy for development environments.