Hi@akhtar,
You can grant an AWS service or another account permission to use a function. The following add-permission example grants the Amazon SNS service permission to invoke a function named my-function.
$ aws lambda add-permission \
--function-name my-function \
--action lambda:InvokeFunction \
--statement-id sns \
--principal sns.amazonaws.com