【发布时间】:2020-12-07 12:54:46
【问题描述】:
我正在尝试使用来自“Account A”中的 Lambda fxn 的 boto3 api 将事件发送到另一个帐户(Account B)中的 kinesis 流
kinesis = boto3.client('kinesis', )
response = kinesis.put_record(
StreamName="account-b-stream-name",
Data=data,
PartitionKey="partitionkey")
这会导致以下错误
An error occurred (AccessDeniedException) when calling the PutRecord operation: User: arn:aws:sts::<AccountA>:assumed-role/putrecords-staging-kinesis-dev-lambdaRole/putrecords-staging-kinesis-dev-hello is not authorized to perform: kinesis:PutRecord on resource: arn:aws:kinesis:eu-west-1:<AccountA>:stream/events_kinesis_staging
boto3 似乎将记录发送到 events_kinesis_staging 并假设它仍在运行 lambda 的 Account A 中。
如何明确指定流的帐户 ID。
【问题讨论】:
标签: boto3 amazon-kinesis