I define my Kinesis Stream int the resources section of the yml (so createdd by the serverlessframewor), and i need to have the name in my function to put record.
The created Kinesis stream name contains a random string so i can’t build it with FN:Join.
How should i do ? How can i pass the created KInesis stream name in the env variables of the serverless.yml ?
resources:
Resources:
MyKinesisStream:
Type: AWS::Kinesis::Stream
Properties:
ShardCount: 1
return await this._kinesisClient.putRecord({
Data: data,
PartitionKey: this._partitionKey,
StreamName: "MY_STREAM_NAME",
}).promise();
environment:
KINESIS_STREAM_NAME: ????
Sorry for my english.