Cloudformation snippet for the role
I am creating a serverless architecture model (SAM) using AWS lambda cloudformation. I have two lambdas - frontend lambda and a backend lambda. The front lambda is in account A and backend lambda is in account B. The front end lambda renders static files from S3 for UI. When it has to do backend data processing it should invoke the backend lambda in another aws account. I do have a role in both the accounts and have trusted both the accounts as well. It is not able to invoke the backend lambda still. How do I invoke the backend lambda using cloudformation template.