创建 Amazon Kinesis Data Streams 导入主题

借助 Amazon Kinesis Data Streams 导入主题,您可以将数据作为外部来源从 Amazon Kinesis Data Streams 提取到 Pub/Sub。然后,您可以将数据流式传输到 Pub/Sub 支持的任何目的地。

本文档介绍了如何创建和管理 Amazon Kinesis Data Streams 导入主题。如需创建标准主题,请参阅 创建标准主题

准备工作

管理导入主题所需的角色和权限

如需获取创建和管理 Amazon Kinesis Data Streams 导入主题所需的权限, 请让管理员授予您 Pub/Sub Editor(roles/pubsub.editor) 针对您的主题或项目的 IAM 角色。 如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限

此预定义角色包含创建和管理 Amazon Kinesis Data Streams 导入主题所需的权限。如需查看所需的确切权限,请展开所需权限部分:

所需权限

如需创建和管理 Amazon Kinesis Data Streams 导入主题,需要具备以下权限:

  • 创建导入主题: pubsub.topics.create
  • 删除导入主题: pubsub.topics.delete
  • 获取导入主题: pubsub.topics.get
  • 列出导入主题: pubsub.topics.list
  • 发布到导入主题: pubsub.topics.publish
  • 更新导入主题: pubsub.topics.update
  • 获取导入主题的 IAM 政策: pubsub.topics.getIamPolicy
  • 为导入主题配置 IAM 政策 pubsub.topics.setIamPolicy

您也可以使用自定义角色或其他预定义角色来获取这些权限。

您可以在项目级别和各个资源级别配置访问权限控制。

设置联合身份以访问 Kinesis Data Streams

借助工作负载身份联合,Google Cloud 服务可以访问在 Google Cloud 外部运行的工作负载。借助身份联合,您无需维护凭据或将凭据传递给 Google Cloud,即可访问其他云中的资源。您可以改用工作负载本身的身份 向 Google Cloud 进行身份验证并访问资源。

在 Google Cloud 中创建服务账号

这是一个可选步骤。 如果您已有服务账号,则可以在本过程中使用该账号,而无需创建新的服务账号。如果您使用的是现有服务账号,请参阅记录服务账号唯一 ID 以了解后续步骤。

对于 Amazon Kinesis Data Streams 导入主题,Pub/Sub 使用服务账号作为身份从 AWS 访问资源。

如需详细了解如何创建服务账号(包括前提条件), 所需的角色和权限以及命名准则,请参阅 创建服务账号。创建 您可能需要等待 60 秒或更长时间才能启动 使用服务账号。出现这种行为的原因是读取操作是最终一致的;新服务账号可能需要一段时间才能显示。

记录服务账号唯一 ID

您需要服务账号唯一 ID 才能在 AWS 控制台中设置角色。

  1. 在 Google Cloud 控制台中,转到服务账号详情页面。

    转到服务账号

  2. 点击您刚刚创建的服务账号或要创建的服务账号。 资源。

  3. 服务账号详情页面,记录唯一 ID 编号。

    您需要在使用自定义信任政策在 AWS 中创建角色部分中使用该 ID。

将 Service Account Token Creator 角色添加到 Pub/Sub 服务账号

Service Account Token Creator 角色 (roles/iam.serviceAccountTokenCreator) 可让主账号为服务账号创建短期有效凭据。这些令牌或凭据用于模拟 服务账号

如需详细了解服务账号模拟,请参阅服务账号模拟

您还可以在此过程中添加 Pub/Sub Publisher 角色 (roles/pubsub.publisher)。如需详细了解此角色以及添加该角色的原因, 请参阅将 Pub/Sub Publisher 角色添加到 Pub/Sub 服务账号

  1. 在 Google Cloud 控制台中,转到 IAM 页面。

    转到 IAM

  2. 启用包括 Google 提供的角色授权选项。

  3. 查找格式为 service-{PROJECT_NUMBER}@gcp-sa-pubsub.iam.gserviceaccount.com 的服务账号。

  4. 对于此服务账号,请点击修改主账号按钮。

  5. 根据需要,点击添加其他角色

  6. 搜索并选择 Service account token Creator 角色 (roles/iam.serviceAccountTokenCreator)。

  7. 点击保存

在 AWS 中创建政策

您需要在 AWS 中创建一项政策,以便 Pub/Sub 能够向 AWS 进行身份验证,从而从 AWS Kinesis 数据流中提取数据。在创建 AWS 政策之前,请先创建 Kinesis 数据流并在其上注册使用方。我们建议您采用这种做法,以便限制对特定数据流的权限。

  • 如需详细了解如何创建 AWS Kinesis 数据流,请参阅 Kinesis 数据流

  • 如需详细了解用于注册使用方的 AWS Kinesis Data Streams API,请参阅 RegisterStreamConsumer

  • 有关如何在 AWS 中创建政策的更多方法和信息,请参阅 创建 IAM 政策

如需在 AWS 中创建政策,请执行以下步骤:

  1. 登录 AWS 管理控制台,然后打开 IAM 控制台

  2. IAM 控制台的导航窗格中,依次点击访问权限管理 > 政策

  3. 点击创建政策

  4. 选择服务部分,选择 Kinesis

  5. 对于允许的操作,请选择以下选项:

    • 列表 > ListShards

      此操作会授予列出数据流中的分片并 会提供有关每个分片的信息。

    • 阅读 >SubscribeToShard

      此操作授予通过以下方式监听特定分片的权限: 增强了扇出功能

    • 读取 > DescribeStreamConsumer

      此操作会授予获取说明 注册流使用方。

    这些权限涵盖从数据流中读取数据。Pub/Sub 仅支持使用流式 SubscribeToShard API 从具有增强型扇出的 Kinesis 流中读取数据。

  6. 对于资源,如果您希望将政策的适用范围限制为特定直播 或使用方(推荐),请指定使用方 ARN数据流 ARN

  7. 点击添加更多权限

  8. 选择服务部分,输入并选择 STS

  9. 对于允许的操作,依次选择写入 > AssumeRoleWithWebIdentity

    此操作会授予权限,以便 Pub/Sub 获取一组临时安全凭据,以便使用身份联合向 Kinesis 数据流进行身份验证。

  10. 点击下一步

  11. 输入政策名称和说明。

  12. 点击创建政策

使用自定义信任政策在 AWS 中创建角色

您必须在 AWS 中创建角色,以便 Pub/Sub 可以进行身份验证 从 Kinesis Data Streams 注入数据。

如需使用自定义信任政策创建角色,请执行以下步骤:

  1. 登录 AWS 管理控制台并打开 IAM 控制台

  2. IAM 的控制台导航窗格中,点击角色

  3. 点击 Create role

  4. 对于 Select trusted entity(选择可信实体),选择 Custom trust policy(自定义信任政策)。

  5. 自定义信任政策部分,输入或粘贴以下内容:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
         "Effect": "Allow",
         "Principal": {
            "Federated": "accounts.google.com"
         },
         "Action": "sts:AssumeRoleWithWebIdentity",
         "Condition": {
             "StringEquals": {
               "accounts.google.com:sub": "<SERVICE_ACCOUNT_UNIQUE_ID>"
             }
          }
        }
      ]
    }
    

    <SERVICE_ACCOUNT_UNIQUE_ID> 替换为 您记录在日志中的服务账号 记录服务账号的唯一 ID

  6. 点击下一步

  7. 对于添加权限,请搜索并选择您刚刚创建的自定义政策。

  8. 点击下一步

  9. 输入角色名称和说明。

  10. 点击 Create role

将 Pub/Sub Publisher 角色添加到 Pub/Sub 服务账号

您必须向 Pub/Sub 服务账号分配发布商角色,以便 Pub/Sub 能够从 AWS Kinesis Data Streams 发布到导入主题。

允许从所有主题发布

  1. 在 Google Cloud 控制台中,转到 IAM 页面。

    转到 IAM

  2. 启用包括 Google 提供的角色授权选项。

  3. 查找采用以下格式的服务账号 service-{PROJECT_NUMBER}@gcp-sa-pubsub.iam.gserviceaccount.com

  4. 对于此服务账号,请点击修改主账号按钮。

  5. 根据需要,点击添加其他角色

  6. 搜索并选择 Pub/Sub Publisher 角色 (roles/pubsub.publisher)。

  7. 点击保存

允许从单个主题发布

如果您想仅向特定的 Amazon Kinesis Data Streams 导入主题授予发布权限,请按以下步骤操作:

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

    At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

  2. 运行 gcloud pubsub topics add-iam-policy-binding 命令:

    gcloud pubsub topics add-iam-policy-binding TOPIC_ID\
       --member="serviceAccount:service-PROJECT_NUMBER@gcp-sa-pubsub.iam.gserviceaccount.com"\
       --role="roles/pubsub.publisher"

    替换以下内容:

    • TOPIC_ID 是 Amazon Kinesis Data Streams 导入主题的主题 ID。

    • PROJECT_NUMBER 是项目编号。查看项目 请参阅识别项目

将服务账号用户角色添加到服务账号

Service Account User 角色 (roles/iam.serviceAccountUser) 包含 iam.serviceAccounts.actAs 权限,可让主账号将服务账号附加到 Amazon Kinesis Data Streams 导入主题的提取设置,并使用该服务账号进行联合身份验证。

执行以下步骤:

  1. 在 Google Cloud 控制台中,转到 IAM 页面。

    转到 IAM

  2. 对于发出创建或更新主题调用的主账号,请点击修改主账号按钮。

  3. 根据需要,点击添加其他角色

  4. 搜索并选择 Service account user 角色 (roles/iam.serviceAccountUser)。

  5. 点击保存

创建 Amazon Kinesis Data Streams 导入主题

如需详细了解与主题关联的属性,请参阅主题的属性

确保您已完成以下步骤:

如需创建 Amazon Kinesis Data Streams 导入主题,请按照以下步骤操作:

控制台

  1. 在 Google Cloud 控制台中,前往主题页面。

    转到“主题”

  2. 点击创建主题

  3. 主题 ID 字段中,输入 Amazon Kinesis Data Streams 导入主题的 ID。

    如需详细了解如何命名主题,请参阅命名准则

  4. 选择添加默认订阅

  5. 选择启用提取

  6. 在提取来源中,选择 Amazon Kinesis Data Streams

  7. 输入以下详细信息:

    • Kinesis Stream ARN:指定 Cloud Functions 数据流的 Kinesis 数据流的 ARN。 推送到 Pub/SubARN 格式 如下所示: arn:${Partition}:kinesis:${Region}:${Account}:stream/${StreamName}

    • Kinesis Consumer ARN: 注册到 AWS Kinesis Data Stream。ARN 格式为 如下: arn:${Partition}:kinesis:${Region}:${Account}:${StreamType}/${StreamName}/consumer/${ConsumerName}:${ConsumerCreationTimpstamp}

    • AWS 角色 ARN:AWS 角色的 ARN。此 Feed 中的 ARN 格式 角色如下: arn:aws:iam:${Account}:role/${RoleName}

    • 服务账号:您在在以下位置创建服务账号时创建的服务账号 Google Cloud

  8. 点击创建主题

gcloud

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

    At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

  2. 运行 gcloud pubsub topics create 命令:

    gcloud pubsub topics create TOPIC_ID 
    --kinesis-ingestion-stream-arn KINESIS_STREAM_ARN
    --kinesis-ingestion-consumer-arn KINESIS_CONSUMER_ARN
    --kinesis-ingestion-role-arn KINESIS_ROLE_ARN
    --kinesis-ingestion-service-account PUBSUB_SERVICE_ACCOUNT

    替换以下内容:

    • TOPIC_ID 是主题 ID。

    • KINESIS_STREAM_ARN 是您计划提取到 Pub/Sub 的 Kinesis Data Streams 的 ARN。ARN 格式如下:arn:${Partition}:kinesis:${Region}:${Account}:stream/${StreamName}

    • KINESIS_CONSUMER_ARN 是已注册到 AWS Kinesis Data Streams 的使用方资源的 ARN。ARN 格式如下:arn:${Partition}:kinesis:${Region}:${Account}:${StreamType}/${StreamName}/consumer/${ConsumerName}:${ConsumerCreationTimpstamp}

    • KINESIS_ROLE_ARN 是 AWS 角色的 ARN。该角色的 ARN 格式如下:arn:aws:iam:${Account}:role/${RoleName}

    • PUBSUB_SERVICE_ACCOUNT 是您 创建于创建服务账号 Google Cloud 中的管理实例

Go

在尝试此示例之前,请按照Go Pub/Sub 快速入门: 客户端库。 如需了解详情,请参阅 Pub/Sub Go API 参考文档

如需向 Pub/Sub 进行身份验证,请设置应用默认凭据。 如需了解详情,请参阅为本地开发环境设置身份验证

import (
	"context"
	"fmt"
	"io"

	"cloud.google.com/go/pubsub"
)

func createTopicWithKinesisIngestion(w io.Writer, projectID, topicID string) error {
	// projectID := "my-project-id"
	// topicID := "my-topic"
	streamARN := "stream-arn"
	consumerARN := "consumer-arn"
	awsRoleARN := "aws-role-arn"
	gcpServiceAccount := "gcp-service-account"

	ctx := context.Background()
	client, err := pubsub.NewClient(ctx, projectID)
	if err != nil {
		return fmt.Errorf("pubsub.NewClient: %w", err)
	}
	defer client.Close()

	cfg := &pubsub.TopicConfig{
		IngestionDataSourceSettings: &pubsub.IngestionDataSourceSettings{
			Source: &pubsub.IngestionDataSourceAWSKinesis{
				StreamARN:         streamARN,
				ConsumerARN:       consumerARN,
				AWSRoleARN:        awsRoleARN,
				GCPServiceAccount: gcpServiceAccount,
			},
		},
	}
	t, err := client.CreateTopicWithConfig(ctx, topicID, cfg)
	if err != nil {
		return fmt.Errorf("CreateTopic: %w", err)
	}
	fmt.Fprintf(w, "Kinesis topic created: %v\n", t)
	return nil
}

Java

在尝试此示例之前,请按照 Pub/Sub 快速入门:使用客户端库中的 Java 设置说明进行操作。 如需了解详情,请参阅 Pub/Sub Java API 参考文档

如需向 Pub/Sub 进行身份验证,请设置应用默认凭据。 如需了解详情,请参阅为本地开发环境设置身份验证


import com.google.cloud.pubsub.v1.TopicAdminClient;
import com.google.pubsub.v1.IngestionDataSourceSettings;
import com.google.pubsub.v1.Topic;
import com.google.pubsub.v1.TopicName;
import java.io.IOException;

public class CreateTopicWithKinesisIngestionExample {
  public static void main(String... args) throws Exception {
    // TODO(developer): Replace these variables before running the sample.
    String projectId = "your-project-id";
    String topicId = "your-topic-id";
    // Kinesis ingestion settings.
    String streamArn = "stream-arn";
    String consumerArn = "consumer-arn";
    String awsRoleArn = "aws-role-arn";
    String gcpServiceAccount = "gcp-service-account";

    createTopicWithKinesisIngestionExample(
        projectId, topicId, streamArn, consumerArn, awsRoleArn, gcpServiceAccount);
  }

  public static void createTopicWithKinesisIngestionExample(
      String projectId,
      String topicId,
      String streamArn,
      String consumerArn,
      String awsRoleArn,
      String gcpServiceAccount)
      throws IOException {
    try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
      TopicName topicName = TopicName.of(projectId, topicId);

      IngestionDataSourceSettings.AwsKinesis awsKinesis =
          IngestionDataSourceSettings.AwsKinesis.newBuilder()
              .setStreamArn(streamArn)
              .setConsumerArn(consumerArn)
              .setAwsRoleArn(awsRoleArn)
              .setGcpServiceAccount(gcpServiceAccount)
              .build();
      IngestionDataSourceSettings ingestionDataSourceSettings =
          IngestionDataSourceSettings.newBuilder().setAwsKinesis(awsKinesis).build();

      Topic topic =
          topicAdminClient.createTopic(
              Topic.newBuilder()
                  .setName(topicName.toString())
                  .setIngestionDataSourceSettings(ingestionDataSourceSettings)
                  .build());

      System.out.println("Created topic with Kinesis ingestion settings: " + topic.getAllFields());
    }
  }
}

Node.js

在尝试此示例之前,请按照Node.js Pub/Sub 快速入门: 客户端库。 如需了解详情,请参阅 Pub/Sub Node.js API 参考文档

如需向 Pub/Sub 进行身份验证,请设置应用默认凭据。 如需了解详情,请参阅为本地开发环境设置身份验证

/**
 * TODO(developer): Uncomment these variables before running the sample.
 */
// const topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID';
// const roleArn = 'arn:aws:iam:...';
// const gcpServiceAccount = 'ingestion-account@...';
// const streamArn = 'arn:aws:kinesis:...';
// const consumerArn = 'arn:aws:kinesis:...';

// Imports the Google Cloud client library
const {PubSub} = require('@google-cloud/pubsub');

// Creates a client; cache this for further use
const pubSubClient = new PubSub();

async function createTopicWithKinesisIngestion(
  topicNameOrId,
  awsRoleArn,
  gcpServiceAccount,
  streamArn,
  consumerArn
) {
  // Creates a new topic with a schema. Note that you might also
  // pass Encodings.Json or Encodings.Binary here.
  await pubSubClient.createTopic({
    name: topicNameOrId,
    ingestionDataSourceSettings: {
      awsKinesis: {
        awsRoleArn,
        gcpServiceAccount,
        streamArn,
        consumerArn,
      },
    },
  });
  console.log(`Topic ${topicNameOrId} created with AWS Kinesis ingestion.`);
}

Python

在尝试此示例之前,请按照 Pub/Sub 快速入门:使用客户端库中的 Python 设置说明进行操作。 有关详情,请参阅 Pub/Sub Python API 参考文档

如需向 Pub/Sub 进行身份验证,请设置应用默认凭据。 如需了解详情,请参阅为本地开发环境设置身份验证

from google.cloud import pubsub_v1
from google.pubsub_v1.types import Topic
from google.pubsub_v1.types import IngestionDataSourceSettings

# TODO(developer)
# project_id = "your-project-id"
# topic_id = "your-topic-id"
# stream_arn = "your-stream-arn"
# consumer_arn = "your-consumer-arn"
# aws_role_arn = "your-aws-role-arn"
# gcp_service_account = "your-gcp-service-account"

publisher = pubsub_v1.PublisherClient()
topic_path = publisher.topic_path(project_id, topic_id)

request = Topic(
    name=topic_path,
    ingestion_data_source_settings=IngestionDataSourceSettings(
        aws_kinesis=IngestionDataSourceSettings.AwsKinesis(
            stream_arn=stream_arn,
            consumer_arn=consumer_arn,
            aws_role_arn=aws_role_arn,
            gcp_service_account=gcp_service_account,
        )
    ),
)

topic = publisher.create_topic(request=request)

print(f"Created topic: {topic.name} with AWS Kinesis Ingestion Settings")

C++

在尝试此示例之前,请按照 Pub/Sub 快速入门:使用客户端库中的 C++ 设置说明进行操作。 有关详情,请参阅 Pub/Sub C++ API 参考文档

如需向 Pub/Sub 进行身份验证,请设置应用默认凭据。 如需了解详情,请参阅为本地开发环境设置身份验证

namespace pubsub = ::google::cloud::pubsub;
namespace pubsub_admin = ::google::cloud::pubsub_admin;
[](pubsub_admin::TopicAdminClient client, std::string project_id,
   std::string topic_id, std::string stream_arn, std::string consumer_arn,
   std::string aws_role_arn, std::string gcp_service_account) {
  google::pubsub::v1::Topic request;
  request.set_name(
      pubsub::Topic(std::move(project_id), std::move(topic_id)).FullName());
  auto* aws_kinesis =
      request.mutable_ingestion_data_source_settings()->mutable_aws_kinesis();
  aws_kinesis->set_stream_arn(stream_arn);
  aws_kinesis->set_consumer_arn(consumer_arn);
  aws_kinesis->set_aws_role_arn(aws_role_arn);
  aws_kinesis->set_gcp_service_account(gcp_service_account);

  auto topic = client.CreateTopic(request);
  // Note that kAlreadyExists is a possible error when the library retries.
  if (topic.status().code() == google::cloud::StatusCode::kAlreadyExists) {
    std::cout << "The topic already exists\n";
    return;
  }
  if (!topic) throw std::move(topic).status();

  std::cout << "The topic was successfully created: " << topic->DebugString()
            << "\n";
}

Node.js (TypeScript)

在尝试此示例之前,请按照《Pub/Sub 快速入门:使用客户端库》中的 Node.js 设置说明执行操作。 如需了解详情,请参阅 Pub/Sub Node.js API 参考文档

如需向 Pub/Sub 进行身份验证,请设置应用默认凭据。 如需了解详情,请参阅为本地开发环境设置身份验证

/**
 * TODO(developer): Uncomment these variables before running the sample.
 */
// const topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID';
// const roleArn = 'arn:aws:iam:...';
// const gcpServiceAccount = 'ingestion-account@...';
// const streamArn = 'arn:aws:kinesis:...';
// const consumerArn = 'arn:aws:kinesis:...';

// Imports the Google Cloud client library
import {PubSub} from '@google-cloud/pubsub';

// Creates a client; cache this for further use
const pubSubClient = new PubSub();

async function createTopicWithKinesisIngestion(
  topicNameOrId: string,
  awsRoleArn: string,
  gcpServiceAccount: string,
  streamArn: string,
  consumerArn: string
) {
  // Creates a new topic with a schema. Note that you might also
  // pass Encodings.Json or Encodings.Binary here.
  await pubSubClient.createTopic({
    name: topicNameOrId,
    ingestionDataSourceSettings: {
      awsKinesis: {
        awsRoleArn,
        gcpServiceAccount,
        streamArn,
        consumerArn,
      },
    },
  });
  console.log(`Topic ${topicNameOrId} created with AWS Kinesis ingestion.`);
}

如需详细了解 ARN,请参阅 Amazon 资源名称 (ARN)IAM 标识符

如果遇到问题 请参阅排查 Amazon Kinesis 数据流导入问题主题。

修改 Amazon Kinesis Data Streams 导入主题

您可以修改 Amazon Kinesis Data Streams 导入主题的提取数据源设置。执行以下步骤:

控制台

  1. 在 Google Cloud 控制台中,前往主题页面。

    转到“主题”

  2. 点击“Amazon Kinesis Data Streams 导入”主题。

  3. 在主题详情页面中,点击修改

  4. 更新您要更改的字段。

  5. 点击更新

gcloud

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

    At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

  2. 使用以下代码中提及的所有标志运行 gcloud pubsub topics update 命令 示例:

      gcloud pubsub topics update TOPIC_ID 
    --kinesis-ingestion-stream-arn KINESIS_STREAM_ARN
    --kinesis-ingestion-consumer-arn KINESIS_CONSUMER_ARN
    --kinesis-ingestion-role-arn KINESIS_ROLE_ARN
    --kinesis-ingestion-service-account PUBSUB_SERVICE_ACCOUNT

    替换以下内容:

    • TOPIC_ID 是主题 ID。此字段无法更新。

    • KINESIS_STREAM_ARN 是 Kinesis 数据流的 ARN 注入 Pub/Sub 的数据源。ARN 格式如下:arn:${Partition}:kinesis:${Region}:${Account}:stream/${StreamName}

    • KINESIS_CONSUMER_ARN 是注册到 AWS Kinesis Data Streams 的使用方资源的 ARN。ARN 格式为 如下: arn:${Partition}:kinesis:${Region}:${Account}:${StreamType}/${StreamName}/consumer/${ConsumerName}:${ConsumerCreationTimpstamp}

    • KINESIS_ROLE_ARN 是 AWS 角色的 ARN。该角色的 ARN 格式如下:arn:aws:iam:${Account}:role/${RoleName}

    • PUBSUB_SERVICE_ACCOUNT 是您 在在 Google Cloud 中创建服务账号中创建的任务。

Amazon Kinesis Data Streams 导入主题的配额和限制

导入主题的发布者吞吐量受主题的发布配额的约束。如需了解详情,请参阅 Pub/Sub 配额和限制

后续步骤