I'm getting Template format error: YAML not well-formed
on the final line of this resource but no idea where I'm going wrong.
LambdaPermission:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName: !GetAtt LambdaFunction.Arn
Principal: apigateway.amazonaws.com
SourceArn: !Join
- ''
- - !Sub 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:'
- Fn::ImportValue:
!Sub ${ParentStack}-api
- '/*'
There should be a tab after ImportValue
.
LambdaPermission:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName: !GetAtt LambdaFunction.Arn
Principal: apigateway.amazonaws.com
SourceArn: !Join
- ''
- - !Sub 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:'
- Fn::ImportValue:
!Sub ${ParentStack}-api
- '/*'