Best way to export AWS Lambda Arn

aws
lambda

#1

Hello,
I’ve created an AWS Lambda using the framework and wonder how to export the Arn since I need it from the outside world. The only way I found so far is https://stackoverflow.com/questions/44032664/reference-function-from-within-serverless-yml. But it requires to hardcode the aws account id which is a bad idea I believe.
Would appreciate any help!!!


#2

If the question is about AWS Pseudo Parameters

Here’s an example on how to reference aws account id.

 Resources:
    - 'Fn::Join':
      - ':'
      -
        - 'arn:aws:logs'
        - Ref: 'AWS::Region'
        - Ref: 'AWS::AccountId'
        - 'log-group:/aws/lambda/*:*:*'