I am trying to do GetFunction/InvokeFunction action on an AWS Lambda function(Account A) from and ec2 instance running in another Account(Account B).
On adding Lambda Permission in Account A to allow access to account B, I am able to perform both actions GetFunction and InvokeFunction.
But GetFunction is returning KMSAccessDeniedException for environment variables of Lambda Function. I have not encrypted environment variables for lambda function. Performing same action from an EC2 within the account, I am getting proper value for environment variables. Do i need to add additional permission for KMS ?