Pls help I have a Lambda function in Account A that I need to use as a service token for a custom resource in Account B.
Pleas help with a Cloudformation Setup
Below is my Setup
Account A Resource
Resources:
MyLambdaFunction:
Type: AWS::Lambda::Function
Properties:
FunctionName: MyLambdaFunction
Handler: index.handler
Role: arn:aws:iam::<Account A ID>:role/LambdaExecutionRole
Code:
S3Bucket: my-bucket
S3Key: my-lambda-code.zip
Runtime: python3.8
Timeout: 60
Account B Resource
Resources:
MyCustomResource:
Type: "Custom::MyCustomResource"
Properties:
ServiceToken: "arn:aws:lambda:AccountA:region:function:MyLambdaFunction"