Cross Account S3 notification

Hello,

Does anyone have a template for a serverless yaml file for a lambda which will get triggered when a file is created in a cross account bucket. I have a working example when the bucket is in the same account but I cant figure out how to assume the role just for creating the cross account notifications.