# Reference function arn in serverless.yml step-function

**URL:** <https://forum.serverless.com/t/reference-function-arn-in-serverless-yml-step-function/11443>\
**Category:** Serverless Framework\
**Created:** [May 14, 2020, 9:26am UTC](https://forum.serverless.com/t/reference-function-arn-in-serverless-yml-step-function/11443 "2020-05-14T09:26:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![khinester](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/khinester/32/315_2.png) [@khinester](https://forum.serverless.com/u/khinester)\
**Post date:** [May 14, 2020, 9:26am UTC](https://forum.serverless.com/t/reference-function-arn-in-serverless-yml-step-function/11443/1 "2020-05-14T09:26:53Z")

</div>

Hello,  
My serverless.yml is like:

```auto
service: mw-selenium-lambda-${opt:stage}

plugins:
  - serverless-plugin-tracing
  - serverless-iam-roles-per-function
  - serverless-step-functions

provider:
  name: aws
  stage: ${opt:stage}
  region: ${file(./config.yml):${opt:stage}.REGION}
  version: ${file(./package.json):version}
  tracing: true # enable tracing
  apiGateway:
    apiKeySourceType: HEADER
  apiKeys:
    - ${opt:stage}-sfn-init-key

functions:
  sfnInit:
    ${file(resources/functions/sfn-init.yml)}
  selenium:
    ${file(resources/functions/selenium.yml)}

stepFunctions:
  stateMachines:
    machine:
      StartAt: selenium
      States:
        SeleniumTest:
          Type: Task
          Resource: !Ref selenium
          End: true

```

and my sfn-init.yml is as follows:

```auto
handler: bin/sfn-init
description: >-
  This function takes a argument `number` via http post request and starts that
  many instances of the specified step function
memorySize: 128
timeout: 30
runtime: go1.x
iamRoleStatements:
  - Effect: Allow
    Action:
      - xray:PutTraceSegments
      - xray:PutTelemetryRecords
    Resource:
      - "*"
  - Effect: Allow
    Action:
      - states:startExecution
    Resource:
      - "*"
package:
   individually: true
   include:
     - ./bin/sfn-init
environment:
  STEP_FUNCTION_ARN:
    Fn::GetAtt: [seleniumTest, Arn]
events:
  - http:
      path: '/${opt:stage}'
      method: post
      private: true

```

how do i get the `STEP_FUNCTION_ARN` into the `sfn-init` environment from within the same deployment stack?
