Python 代码示例:
import boto3
client = boto3.client('datapipeline')
response = client.create_pipeline(
name='my-dynamodb-export-pipeline',
uniqueId='12345678-aaaa-bbbb-cccc-0123456789ab',
description='Export DynamoDB data to S3',
region='us-east-1',
tags=[
{
'key': 'environment',
'value': 'production'
},
],
pipeline={
'name': 'MyDynamoDBExportPipeline',
'role': 'my-datapipeline-role',
'stages': [
{
'name': 'ReadFromDynamoDB',
'actions': [
{
'input': {
'tableName': 'my-dynamodb-table',
'readThroughputPercent': '25'
},
'output': {
's3': {
'bucket': 'my-s3-bucket',
'directoryPath': 'dynamodb-export'
}
},
'name': 'DynamoDBDataNode',
'runsOn': 'MyEC2Instance',
'actionTypeId': {