Is it possible to put records into a kinesis stream located in another AWS account?
I configured my kinesis producer with an STS assumed role, but I can't see how to specify a stream name in another account (it doesn't accept an ARN, only a stream name).
Init logic:
AWSCredentialsProviderChain credentialsProvider = new AWSCredentialsProviderChain(
DefaultAWSCredentialsProviderChain.getInstance(),
new STSAssumeRoleSessionCredentialsProvider.Builder(
config.getKinesisStreamRoleArn(),
roleSessionName)
.withExternalId(config.getKinesisStreamRoleExternalId())
.build());
Properties props = new Properties();
props.load(getClass().getClassLoader().getResourceAsStream("kinesis_producer_config.properties"));
KinesisProducerConfiguration producerConfig = KinesisProducerConfiguration.fromProperties(props)
.setCredentialsProvider(credentialsProvider);
if (!Strings.isNullOrEmpty(config.getKinesisStreamRegion())) {
producerConfig.setRegion(config.getKinesisStreamRegion());
}
return new KinesisProducer(producerConfig);
and the error:
Encountered AWSError
ResourceNotFoundException
Stream my-stream under account 111111111111 not found.:
(where 111111111111 is the other aws account)