# Serverless-s3-deploy suddenly doesn't do its job?

**URL:** <https://forum.serverless.com/t/serverless-s3-deploy-suddenly-doesnt-do-its-job/6484>\
**Category:** Serverless Framework\
**Tags:** aws, cloudformation\
**Created:** [November 18, 2018, 8:06am UTC](https://forum.serverless.com/t/serverless-s3-deploy-suddenly-doesnt-do-its-job/6484 "2018-11-18T08:06:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrFriendless](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/drfriendless/32/1767_2.png) [@DrFriendless](https://forum.serverless.com/u/DrFriendless)\
**Post date:** [November 18, 2018, 8:06am UTC](https://forum.serverless.com/t/serverless-s3-deploy-suddenly-doesnt-do-its-job/6484/1 "2018-11-18T08:06:22Z")

</div>

I’ve been using serverless-s3-deploy for months to deploy 3 sites. Today I tried to deploy for the first time in a month or so, and and it told me my bucket already exists. Well duh. (Continued below the log file.)

```
john-xps-15-7700hq:~/projects/ExtendedStatsServerless/client (master) $ sls deploy
Serverless: Packaging service...
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
.....
Serverless: Stack create finished...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
...
Serverless: Operation failed!
 
  Serverless Error ---------------------------------------
 
  An error occurred: StaticBucket - test.drfriendless.com already exists.
 
  Get Support --------------------------------------------
     Docs: docs.serverless.com
     Bugs: github.com/serverless/serverless/issues
     Issues: forum.serverless.com
 
  Your Environment Information -----------------------------
     OS: linux
     Node Version: 8.12.0
     Serverless Version: 1.33.1

```

So I figure it’s AWS trying to tell me some other thing, so I deleted the deployment stack and bucket (not [test.drfriendless.com](http://test.drfriendless.com)) and tell it to do it again. But it gives the same error. OK, [test.drfriendless.com](http://test.drfriendless.com) is not that vital, so I delete it as well although I don’t believe it’s the problem. (More below.)

```
john-xps-15-7700hq:~/projects/ExtendedStatsServerless/client (master) $ sls deploy
Serverless: Packaging service...
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
.....
Serverless: Stack create finished...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
......
Serverless: Stack update finished...
Service Information
service: client
stage: dev
region: ap-southeast-2
stack: client-dev
api keys:
  None
endpoints:
  None
functions:
  None

```

So it pretends to do the job, and recreates [test.drfriendless.com](http://test.drfriendless.com), but the bucket is empty. Here’s my serverless.yml: (Continued below.)

```
service: client

plugins:
    - serverless-s3-deploy

provider:
  name: aws
  runtime: nodejs6.10
  stage: ${opt:stage, 'dev'}
  timeout: 30
  region: ap-southeast-2

custom:
  assets:
    targets:
     - bucket:
         Ref: StaticBucket
       files:
        - source: static/
          globs: '**/*.*'

resources:
  Resources:
    StaticBucket:
      Type: AWS::S3::Bucket
      Properties:
        BucketName: ${file(../stage.${self:provider.stage}.json):CLIENT_BUCKET}
        AccessControl: PublicRead
        WebsiteConfiguration:
          IndexDocument: index.html
          ErrorDocument: index.html

```

As you can see I’m doing nothing complex, just copying the contents of static up to the site. And of course static has loads of stuff in it.

I find this process to generally be absurdly flaky, and I suspect it’s AWS’s fault. What other things can I try to get my site back? Thank you.
