I feel I have tried just about every combination for this to work, and have come up empty handed. Has anyone done this? I am trying to reference an import value inside of a sub while referencing the the parameter ApiStack. Appreciate any advice!
LambdaPermission:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName: !GetAtt MyLambdaFunction.Arn
Principal: apigateway.amazonaws.com
SourceArn: !Sub
- arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${ApiGateway}/*/POST/CreateBofAParameter
- ApiGateway: !ImportValue
'Fn::Sub': '${ApiStack}--APIID'