I let the code talk:
functions:
TheNameOfFunction:
name: 'TheNameOfFunction'
handler: src/functions/func.default
events:
- s3:
bucket: !Ref StreamS3
event: s3:ObjectCreated:*
existing: true
resources:
Resources:
Type: AWS::Lambda::Permission
DependsOn:
- TheNameOfFunctionLambdaFunction # --> `${FuncName}LambdaFunction`
- StreamS3
Properties:
FunctionName:
'Fn::GetAtt': ['TheNameOfFunctionLambdaFunction', 'Arn'] # --> `${FuncName}LambdaFunction`
Action: 'lambda:InvokeFunction'
Principal: 's3.amazonaws.com'
SourceArn: !GetAtt MetricStreamS3.Arn
So the format goes as: ${FuncName}LambdaFunction
More info: