I have two AWS accounts: Acc1 and Acc2. Acc1 should transfer its secrets to Acc2. By default, you can only transfer secrets to other AWS regions. I want to create a AWS Lambda in Acc1, which fetches the secrets from itself.
In the same lambda function, the secretmanager.create-secret function for Acc2 should to be executed.
Finally, the secrets are to be replicated from Acc1 to Acc2, in only one lambda.
Is this possible, if yes how?
Thx