# Deploying the stack without updating Lambda functions?

**URL:** https://forum.serverless.com/t/deploying-the-stack-without-updating-lambda-functions/8093
**Category:** Serverless Framework
**Created:** [April 25, 2019, 12:53pm UTC](https://forum.serverless.com/t/deploying-the-stack-without-updating-lambda-functions/8093 "2019-04-25T12:53:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Can-Sahin](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@Can-Sahin](https://forum.serverless.com/u/Can-Sahin)
#### Post date: [April 25, 2019, 12:53pm UTC](https://forum.serverless.com/t/deploying-the-stack-without-updating-lambda-functions/8093/1 "2019-04-25T12:53:18Z")

</div>

Hi. I am using serverless for a year now with many projects in production. There are some times i have a such need which I cannot find any related question.

As Infrastructure as Code pattern I keep every configuration on `yml` file. There are times I wanna change the configuration, like removing GSI or adding GSI for dynamodb table or IAM permissions, without updating the lambda functions. But deploying stack updates them all unnecessarily.

Has any have idea on this or feedback? I wanna change my stack without updating lambda functions.

---

<div class="post-metadata">

### Author: ![moro](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/moro/32/4303_2.png) [@moro](https://forum.serverless.com/u/moro)
#### Post date: [April 27, 2019, 2:41pm UTC](https://forum.serverless.com/t/deploying-the-stack-without-updating-lambda-functions/8093/2 "2019-04-27T14:41:58Z")

</div>

Hi, I have a monorepo project, some packages have their internal resources but they use common resources as well (sqs, sns…). So I’ve decided to create an additional package just for this purpose. I have a folder with a serverless.yml file which contains just common resources descriptions. In this way, I can change these resources without redeploying lamdas. So maybe you can create an additional folder and put a serverless.yml with your descriptions there, it will create an extra stack, so you will need to use `Outputs:` + `!ImportValue`.

---

<div class="post-metadata">

### Author: ![Can-Sahin](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@Can-Sahin](https://forum.serverless.com/u/Can-Sahin)
#### Post date: [April 30, 2019, 6:12am UTC](https://forum.serverless.com/t/deploying-the-stack-without-updating-lambda-functions/8093/3 "2019-04-30T06:12:51Z")

</div>

Ok. I kinda understand. Do you have any examples of how to use Outputs and !ImportValue.

Like a code snippet ? It would help to understand better. Thanks

---

<div class="post-metadata">

### Author: ![moro](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/moro/32/4303_2.png) [@moro](https://forum.serverless.com/u/moro)
#### Post date: [April 30, 2019, 3:18pm UTC](https://forum.serverless.com/t/deploying-the-stack-without-updating-lambda-functions/8093/4 "2019-04-30T15:18:11Z")

</div>

Sure.

common resources (common-package serverless.yml)

```auto
Resources:
    IncomingEventSqsQueue:
        Type: AWS::SQS::Queue
        Properties:
            QueueName: ${self:custom.incomingEventSqsQueue}

// export arn + url
Outputs:
    IncomingEventSqsQueueUrl:
        Value: !Ref IncomingEventSqsQueue
        Export:
            Name: ${self:provider.stage}-IncomingEventSqsQueueUrl

    IncomingEventSqsQueueArn:
        Value: !GetAtt IncomingEventSqsQueue.Arn
        Export:
            Name: ${self:provider.stage}-IncomingEventSqsQueueArn

```

in a different package where I want to use this queue

```auto
....
custom:
     incomingEventSqsQueueArn: !ImportValue ${self:provider.stage}-IncomingEventSqsQueueArn
     incomingEventSqsQueueUrl: !ImportValue ${self:provider.stage}-IncomingEventSqsQueueUrl
....
....
functions:
    events-store-handler:
        handler: services/events-store-handler/index.handler
        events:
            - sqs:
                  batchSize: 1
                  arn: ${self:custom.incomingEventSqsQueueArn}

```

So you just need to import value by name.
