AWS neptune documentation change
Summary
Added comprehensive examples for starting Neptune loader jobs (both CSV and openCypher formats) using AWS CLI, SDK, awscurl, and curl commands, including multi-account IAM role examples.
Security assessment
This change provides detailed implementation examples for loader operations. The examples show proper IAM role configuration (including multi-account scenarios) which is a security best practice, but this is standard documentation enhancement rather than addressing a specific security issue. No security vulnerabilities, weaknesses, or incidents are mentioned in the changes.
Diff
diff --git a/neptune/latest/userguide/load-api-reference-load.md b/neptune/latest/userguide/load-api-reference-load.md index f08f300b4..77942d0b6 100644 --- a//neptune/latest/userguide/load-api-reference-load.md +++ b//neptune/latest/userguide/load-api-reference-load.md @@ -125 +125,56 @@ Starting with [engine release 1.2.1.0.R3](./engine-releases-1.2.1.0.R3.html), yo - curl -X POST https://localhost:8182/loader \ +AWS CLI + + + aws neptunedata start-loader-job \ + --endpoint-url https://your-neptune-endpoint:port \ + --source "s3://(the target bucket name)/(the target date file name)" \ + --format "csv" \ + --iam-role-arn "arn:aws:iam::(Account A ID):role/(RoleA),arn:aws:iam::(Account B ID):role/(RoleB),arn:aws:iam::(Account C ID):role/(RoleC)" \ + --s3-bucket-region "us-east-1" + +For more information, see [start-loader-job](https://docs.aws.amazon.com/cli/latest/reference/neptunedata/start-loader-job.html) in the AWS CLI Command Reference. + +SDK + + + import boto3 + from botocore.config import Config + + client = boto3.client( + 'neptunedata', + endpoint_url='https://your-neptune-endpoint:port', + config=Config(read_timeout=None, retries={'total_max_attempts': 1}) + ) + + response = client.start_loader_job( + source='s3://(the target bucket name)/(the target date file name)', + format='csv', + iamRoleArn='arn:aws:iam::(Account A ID):role/(RoleA),arn:aws:iam::(Account B ID):role/(RoleB),arn:aws:iam::(Account C ID):role/(RoleC)', + s3BucketRegion='us-east-1' + ) + + print(response) + +awscurl + + + awscurl https://your-neptune-endpoint:port/loader \ + --region us-east-1 \ + --service neptune-db \ + -X POST \ + -H 'Content-Type: application/json' \ + -d '{ + "source" : "s3://(the target bucket name)/(the target date file name)", + "iamRoleArn" : "arn:aws:iam::(Account A ID):role/(RoleA),arn:aws:iam::(Account B ID):role/(RoleB),arn:aws:iam::(Account C ID):role/(RoleC)", + "format" : "csv", + "region" : "us-east-1" + }' + +###### Note + +This example assumes that your AWS credentials are configured in your environment. Replace `us-east-1` with the Region of your Neptune cluster. + +curl + + + curl -X POST https://your-neptune-endpoint:port/loader \ @@ -349,0 +405,67 @@ Here is an example of an openCypher load command: +AWS CLI + + + + aws neptunedata start-loader-job \ + --endpoint-url https://your-neptune-endpoint:port \ + --source "s3://bucket-name/object-key-name" \ + --format "opencypher" \ + --user-provided-edge-ids \ + --iam-role-arn "arn:aws:iam::account-id:role/role-name" \ + --s3-bucket-region "region" \ + --no-fail-on-error \ + --parallelism "MEDIUM" + +For more information, see [start-loader-job](https://docs.aws.amazon.com/cli/latest/reference/neptunedata/start-loader-job.html) in the AWS CLI Command Reference. + +SDK + + + + import boto3 + from botocore.config import Config + + client = boto3.client( + 'neptunedata', + endpoint_url='https://your-neptune-endpoint:port', + config=Config(read_timeout=None, retries={'total_max_attempts': 1}) + ) + + response = client.start_loader_job( + source='s3://bucket-name/object-key-name', + format='opencypher', + userProvidedEdgeIds=True, + iamRoleArn='arn:aws:iam::account-id:role/role-name', + s3BucketRegion='region', + failOnError=False, + parallelism='MEDIUM' + ) + + print(response) + +awscurl + + + + awscurl https://your-neptune-endpoint:port/loader \ + --region us-east-1 \ + --service neptune-db \ + -X POST \ + -H 'Content-Type: application/json' \ + -d '{ + "source" : "s3://bucket-name/object-key-name", + "format" : "opencypher", + "userProvidedEdgeIds": "TRUE", + "iamRoleArn" : "arn:aws:iam::account-id:role/role-name", + "region" : "region", + "failOnError" : "FALSE", + "parallelism" : "MEDIUM" + }' + +###### Note + +This example assumes that your AWS credentials are configured in your environment. Replace `us-east-1` with the Region of your Neptune cluster. + +curl + + @@ -353,2 +475 @@ Here is an example of an openCypher load command: - -d ' - { + -d '{ @@ -356,2 +477,2 @@ Here is an example of an openCypher load command: - "format" : "**opencypher** ", - **"userProvidedEdgeIds": "TRUE"** , + "format" : "opencypher", + "userProvidedEdgeIds": "TRUE", @@ -361 +482 @@ Here is an example of an openCypher load command: - "parallelism" : "MEDIUM", + "parallelism" : "MEDIUM"