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

查看:235
本文介绍了是否可以跨账户访问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:表/表/流/2016-08-09T23:00:46.852
-函数名称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

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

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文档:

重要

您必须在以下位置创建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/最新/dg/with-ddb-configure-ddb.html

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

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