Skip to content

Instantly share code, notes, and snippets.

@DavidWells
Created September 19, 2020 04:41
Show Gist options
  • Save DavidWells/fda3257aa8fd734073f799e188d20ea1 to your computer and use it in GitHub Desktop.
Save DavidWells/fda3257aa8fd734073f799e188d20ea1 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
@privatejava
Copy link

Awesome man thanks for help

@MrMjauh
Copy link

MrMjauh commented Feb 21, 2024

Thanks 👍 This saved me some time :)

@almeidapaulooliveira
Copy link

Thanks, very handy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment