AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2026-01-10 · Documentation low

File: code-library/latest/ug/neptune_code_examples.md

Summary

Removed 'Get started' section containing Java and Python code examples for describing Neptune DB clusters

Security assessment

The change removes general code examples for Neptune cluster description operations. There's no evidence of security vulnerability fixes, security weaknesses, or incident response. The removed content was routine SDK usage documentation without security-specific context.

Diff

diff --git a/code-library/latest/ug/neptune_code_examples.md b/code-library/latest/ug/neptune_code_examples.md
index b68147b51..1753eae35 100644
--- a//code-library/latest/ug/neptune_code_examples.md
+++ b//code-library/latest/ug/neptune_code_examples.md
@@ -30,153 +29,0 @@ _Scenarios_ are code examples that show you how to accomplish specific tasks by
-**Get started**
-
-The following code examples show how to get started using Neptune.
-
-Java
-    
-
-**SDK for Java 2.x**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javav2/example_code/neptune#code-examples). 
-    
-    
-    /**
-     * Before running this Java V2 code example, set up your development
-     * environment, including your credentials.
-     *
-     * For more information, see the following documentation topic:
-     *
-     * https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html
-     */
-    public class HelloNeptune {
-        public static void main(String[] args) {
-            NeptuneAsyncClient neptuneClient = NeptuneAsyncClient.create();
-            describeDbCluster(neptuneClient).join(); // This ensures the async code runs to completion
-        }
-    
-        /**
-         * Describes the Amazon Neptune DB clusters.
-         *
-         * @param neptuneClient the Neptune asynchronous client used to make the request
-         * @return a {@link CompletableFuture} that completes when the operation is finished
-         */
-        public static CompletableFuture<Void> describeDbCluster(NeptuneAsyncClient neptuneClient) {
-            DescribeDbClustersRequest request = DescribeDbClustersRequest.builder()
-                    .maxRecords(20)
-                    .build();
-    
-            SdkPublisher<DescribeDbClustersResponse> paginator = neptuneClient.describeDBClustersPaginator(request);
-            CompletableFuture<Void> future = new CompletableFuture<>();
-    
-            paginator.subscribe(new Subscriber<DescribeDbClustersResponse>() {
-                private Subscription subscription;
-    
-                @Override
-                public void onSubscribe(Subscription s) {
-                    this.subscription = s;
-                    s.request(Long.MAX_VALUE); // request all items
-                }
-    
-                @Override
-                public void onNext(DescribeDbClustersResponse response) {
-                    response.dbClusters().forEach(cluster -> {
-                        System.out.println("Cluster Identifier: " + cluster.dbClusterIdentifier());
-                        System.out.println("Status: " + cluster.status());
-                    });
-                }
-    
-                @Override
-                public void onError(Throwable t) {
-                    future.completeExceptionally(t);
-                }
-    
-                @Override
-                public void onComplete() {
-                    future.complete(null);
-                }
-            });
-    
-            return future.whenComplete((result, throwable) -> {
-                neptuneClient.close();
-                if (throwable != null) {
-                    System.err.println("Error describing DB clusters: " + throwable.getMessage());
-                }
-            });
-        }
-    
-    
-
-  * For API details, see [DescribeDBClustersPaginator](https://docs.aws.amazon.com/goto/SdkForJavaV2/neptune-2014-10-31/DescribeDBClustersPaginator) in _AWS SDK for Java 2.x API Reference_. 
-
-
-
-
-Python
-    
-
-**SDK for Python (Boto3)**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/neptune#code-examples). 
-    
-    
-    import boto3
-    from botocore.exceptions import ClientError
-    
-    
-    def describe_db_clusters(neptune_client):
-        """
-        Describes the Amazon Neptune DB clusters using a paginator to handle multiple pages.
-        Raises ClientError with 'ResourceNotFoundException' if no clusters are found.
-        """
-        paginator = neptune_client.get_paginator("describe_db_clusters")
-        clusters_found = False
-    
-        for page in paginator.paginate():
-            for cluster in page.get("DBClusters", []):
-                clusters_found = True
-                print(f"Cluster Identifier: {cluster['DBClusterIdentifier']}")
-                print(f"Status: {cluster['Status']}")
-    
-        if not clusters_found:
-            raise ClientError(
-                {
-                    "Error": {
-                        "Code": "ResourceNotFoundException",
-                        "Message": "No Neptune DB clusters found."
-                    }
-                },
-                operation_name="DescribeDBClusters"
-            )
-    
-    def main():
-        """
-        Main entry point: creates the Neptune client and calls the describe operation.
-        """
-        neptune_client = boto3.client("neptune")
-        try:
-            describe_db_clusters(neptune_client)
-        except ClientError as e:
-            error_code = e.response["Error"]["Code"]
-            if error_code == "ResourceNotFoundException":
-                print(f"Resource not found: {e.response['Error']['Message']}")
-            else:
-                print(f"Unexpected ClientError: {e.response['Error']['Message']}")
-        except Exception as e:
-            print(f"Unexpected error: {str(e)}")
-    
-    if __name__ == "__main__":
-        main()
-    
-    
-    
-
-  * For API details, see [DescribeDBClustersPaginator](https://docs.aws.amazon.com/goto/boto3/neptune-2014-10-31/DescribeDBClustersPaginator) in _AWS SDK for Python (Boto3) API Reference_. 
-
-
-
-