79221300

Date: 2024-11-25 00:13:12
Score: 0.5
Natty:
Report link

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:

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Mamzi