Is there any way of creating a Kinesis Firehose stream in the serverless.yaml and associated the service’s role with the stream? I am currently attempting to create a Firehose Stream in resources (where myBucket is an existing S3 bucket):
Check the output of a sls package command (i.e. the generated template files), and confirm that the role statements are being generated as you expect. You’ve done the right thing by overriding the variableSyntax, but best to be sure (alternatively you can inspect the function role you have already deployed as part of your testing).
I haven’t used Firehose personally (it’s not in ap-southeast-2 yet), but you might need to have a trust relationship with the Firehose service principal? As per these docs. Usually you would create a separate IAM role (in your resources section) for it to use i.e. that would have access to the S3 bucket, etc.
I know this is an old thread, but Google leads here so I’m replying for other people.
The reason the role assignment is failing is because it’s trying to assign the default lambda role to the Firehose, and the permissions on that role are not set up for assignment. Serverless Framework does not expose the AssumeRolePolicyDocument on the default role, so you have to create a new role specifically for your Firehose and then assign it.
There might be an easier way to do this, but the example below works.