Triggering a lambda from an SNS topic in a different AWS account

Hi forum-

I’m working on an integration where I need to trigger my lambda from an SNS topic with different credentials than my AWS account where the lambda will be located. The partner has given me the Access Key ID and Secret, and the SNS endpoint details. Is there some way to do this subscription within the serverless.yml file so it’s part of the serverless cloudformation template?

Or do I need to handle this separately (i.e. console or CLI, with a pointer to the lambda that’s created by serverless). And if the latter, is there any concern about the SNS topic -> lambda linkage (or anything else) breaking when I re-deploy newer versions of my lambda?

Thanks!

I decided I was overthinking this … so I just created an http event trigger on my lambda function and added a subscription to the SNS topic to point to my lambda via the https endpoint (as opposed to trying to have SNS->lambda directly across accounts). Much simpler this way…