是否可以跨账户访问 AWS DynamoDB 流? [英] It is possible to Access AWS DynamoDB streams accross accounts?

查看:20
本文介绍了是否可以跨账户访问 AWS DynamoDB 流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的公司使用多账户系统管理 AWS.我在账户 A 中有一个 lambda 函数,在账户 B 中有一个启用了 Stream 的 DynamoDB 表.我希望流事件触发我的函数.

My company manages AWS using a multi-account system. I have a lambda function in account A and a DynamoDB table with a Stream enabled in account B. I want the stream events to trigger my function.

当我跑步时:

aws lambda 创建事件源映射--event-source-arn arn:aws:dynamodb:us-east-1:101010101:table/table/stream/2016-08-09T23:00:46.852--function-name Lambda-qa--启用--批量大小 10--starting-position TRIM_HORIZON

aws lambda create-event-source-mapping --event-source-arn arn:aws:dynamodb:us-east-1:101010101:table/table/stream/2016-08-09T23:00:46.852 --function-name Lambda-qa --enabled --batch-size 10 --starting-position TRIM_HORIZON

我收到以下错误:调用 CreateEventSourceMapping 操作时出错(InvalidParameterValueException):角色和事件源必须与云函数在同一帐户中

I get the following error: An error occurred (InvalidParameterValueException) when calling the CreateEventSourceMapping operation: Role and event source must be in the same account as the cloud function

看起来 Lambda 函数和 DynamoDB 流必须在同一个账户中.但是可以通过其他方式从accountB中读取accountA中的DynamoDB流吗?重定向、SNS、SQS、S3 或自定义应用程序.

Looks like the Lambda function and DynamoDB stream have to be in the same account. But can read the the DynamoDB stream in accountA from accountB through some other means? A redirection, SNS, SQS, S3 or a custom app.

推荐答案

很遗憾,没有.

来自 AWS 文档:

重要

您必须在创建 Lambda 函数的同一区域中创建 DynamoDB 表.本教程假设美国东部(弗吉尼亚北部)地区.另外,表和 Lambda 函数必须属于同一个 AWS 账户."

You must create a DynamoDB table in the same region where you created the Lambda function. This tutorial assumes the US East (N. Virginia) region. In addition, both the table and the Lambda functions must belong to the same AWS account."

(强调)

参考:http://docs.aws.amazon.com/lambda/latest/dg/with-ddb-configure-ddb.html

这篇关于是否可以跨账户访问 AWS DynamoDB 流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆