Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ChunAllen/5b48526ca9ccec474bd85a25742ab7b7 to your computer and use it in GitHub Desktop.
Save ChunAllen/5b48526ca9ccec474bd85a25742ab7b7 to your computer and use it in GitHub Desktop.
Various ways to reference function name and ARN in serverless.yml
function:
foo:
handler: index.handler
# Ways to reference function in serverless.yml
FunctionName: !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${self:service.name}-${self:provider.stage}-foo
FunctionName: !GetAtt FooLambdaFunction.Arn
FunctionName: !Sub "${AWS::StackName}-foo"
FunctionName: ${self:service.name}-${self:provider.stage}-foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment