title: Serverless example not working with serverless-localstack plugin
body: <p>I am running an example from the official <a href="https://github.com/serverless/examples/tree/master/aws-python-rest-api-with-dynamodb" rel="noreferrer">serverless GitHub</a> page and it works well out of the box when I deploy directly on my AWS account.</p>
  
  <p>Now when I try to activate the <a href="https://github.com/localstack/serverless-localstack" rel="noreferrer">serverless-localstack</a> plugin by changing <code>serverless.yml</code> accordingly:</p>
  
  <pre><code>service: serverless-rest-api-with-dynamodb
  
  frameworkVersion: "&gt;=1.1.0 &lt;2.0.0"
  
  provider:
    name: aws
    runtime: python2.7
    environment:
      DYNAMODB_TABLE: ${self:service}-${opt:stage, self:provider.stage}
    iamRoleStatements:
      - Effect: Allow
        Action:
          - dynamodb:Query
          - dynamodb:Scan
          - dynamodb:GetItem
          - dynamodb:PutItem
          - dynamodb:UpdateItem
          - dynamodb:DeleteItem
        Resource: "arn:aws:dynamodb:${opt:region, self:provider.region}:*:table/${self:provider.environment.DYNAMODB_TABLE}"
  
  custom:
    localstack:
      stages:
      - local
      - dev
      endpoints:
        S3: http://localhost:4572
        DynamoDB: http://localhost:4570
        CloudFormation: http://localhost:4581
        Elasticsearch: http://localhost:4571
        ES: http://localhost:4578
        SNS: http://localhost:4575
        SQS: http://localhost:4576
        Lambda: http://localhost:4574
        Kinesis: http://localhost:4568
  
  plugins:
    - serverless-localstack
  
  functions:
    create:
      handler: todos/create.create
      events:
        - http:
            path: todos
            method: post
            cors: true
  
    list:
      handler: todos/list.list
      events:
        - http:
            path: todos
            method: get
            cors: true
  
    get:
      handler: todos/get.get
      events:
        - http:
            path: todos/{id}
            method: get
            cors: true
  
    update:
      handler: todos/update.update
      events:
        - http:
            path: todos/{id}
            method: put
            cors: true
  
    delete:
      handler: todos/delete.delete
      events:
        - http:
            path: todos/{id}
            method: delete
            cors: true
  
  resources:
    Resources:
      TodosDynamoDbTable:
        Type: 'AWS::DynamoDB::Table'
        DeletionPolicy: Retain
        Properties:
          AttributeDefinitions:
            -
              AttributeName: id
              AttributeType: S
          KeySchema:
            -
              AttributeName: id
              KeyType: HASH
          ProvisionedThroughput:
            ReadCapacityUnits: 1
            WriteCapacityUnits: 1
          TableName: ${self:provider.environment.DYNAMODB_TABLE}
  </code></pre>
  
  <p>I get the following error on the <code>localstack</code> side (running in docker):</p>
  
  <pre><code>localstack_1  | 2019-12-04 09:48:15,260:API: 127.0.0.1 - - [04/Dec/2019 09:48:15] "GET /serverless-rest-api-with-dynamodb-local-ServerlessDeploymentBucket-5YYKLD61WXMT?location HTTP/1.1" 404 -
  localstack_1  | 2019-12-04T09:48:15:DEBUG:localstack.services.cloudformation.cloudformation_listener: Error response from CloudFormation (400) POST /: b'&lt;ErrorResponse xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/"&gt;\n  &lt;Error&gt;\n    &lt;Type&gt;Sender&lt;/Type&gt;\n    &lt;Code&gt;ValidationError&lt;/Code&gt;\n    &lt;Message&gt;Stack with id serverless-rest-api-with-dynamodb-local does not exist&lt;/Message&gt;\n  &lt;/Error&gt;\n  &lt;RequestId&gt;cf4c737e-5ae2-11e4-a7c9-ad44eEXAMPLE&lt;/RequestId&gt;\n&lt;/ErrorResponse&gt;'
  localstack_1  | 2019-12-04T09:48:15:DEBUG:localstack.services.cloudformation.cloudformation_starter: Currently updating stack resource serverless-rest-api-with-dynamodb-local/ServerlessDeploymentBucket: None
  localstack_1  | 2019-12-04T09:48:15:ERROR:localstack.services.cloudformation.cloudformation_starter: Unable to parse and create resource "ServerlessDeploymentBucket": 400 Bad Request: &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  localstack_1  | &lt;Error&gt;
  localstack_1  |     &lt;Code&gt;InvalidBucketName&lt;/Code&gt;
  localstack_1  |     &lt;Message&gt;The specified bucket is not valid.&lt;/Message&gt;
  localstack_1  |     
  localstack_1  |     &lt;RequestID&gt;7a62c49f-347e-4fc4-9331-6e8eEXAMPLE&lt;/RequestID&gt;
  localstack_1  | &lt;/Error&gt; Traceback (most recent call last):
  localstack_1  |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 173, in parse_and_create_resource
  localstack_1  |     return _parse_and_create_resource(logical_id, resource_json, resources_map, region_name)
  localstack_1  |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 229, in _parse_and_create_resource
  localstack_1  |     resource_json_arns_fixed, resources_map, region_name)
  localstack_1  |   File "/opt/code/localstack/.venv/lib/python3.7/site-packages/moto/cloudformation/parsing.py", line 306, in parse_and_create_resource
  localstack_1  |     resource_name, resource_json, region_name)
  localstack_1  |   File "/opt/code/localstack/.venv/lib/python3.7/site-packages/moto/s3/models.py", line 701, in create_from_cloudformation_json
  localstack_1  |     bucket = s3_backend.create_bucket(resource_name, region_name)
  localstack_1  |   File "/opt/code/localstack/.venv/lib/python3.7/site-packages/moto/s3/models.py", line 714, in create_bucket
  localstack_1  |     raise InvalidBucketName()
  localstack_1  | moto.s3.exceptions.InvalidBucketName: 400 Bad Request: &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  localstack_1  | &lt;Error&gt;
  localstack_1  |     &lt;Code&gt;InvalidBucketName&lt;/Code&gt;
  localstack_1  |     &lt;Message&gt;The specified bucket is not valid.&lt;/Message&gt;
  localstack_1  |     
  localstack_1  |     &lt;RequestID&gt;7a62c49f-347e-4fc4-9331-6e8eEXAMPLE&lt;/RequestID&gt;
  localstack_1  | &lt;/Error&gt;
  localstack_1  | 
  localstack_1  | 2019-12-04T09:48:15:DEBUG:localstack.services.cloudformation.cloudformation_listener: Error response from CloudFormation (400) POST /: b'&lt;?xml version="1.0" encoding="UTF-8"?&gt;\n&lt;Error&gt;\n    &lt;Code&gt;InvalidBucketName&lt;/Code&gt;\n    &lt;Message&gt;The specified bucket is not valid.&lt;/Message&gt;\n    \n    &lt;RequestID&gt;7a62c49f-347e-4fc4-9331-6e8eEXAMPLE&lt;/RequestID&gt;\n&lt;/Error&gt;'
  localstack_1  | 2019-12-04 09:48:34,571:API: 127.0.0.1 - - [04/Dec/2019 09:48:34] "GET /serverless-rest-api-with-dynamodb-local-ServerlessDeploymentBucket-C5ZNB3XCGTSA?location HTTP/1.1" 404 -
  localstack_1  | 2019-12-04T09:48:34:DEBUG:localstack.services.cloudformation.cloudformation_listener: Error response from CloudFormation (400) POST /: b'&lt;ErrorResponse xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/"&gt;\n  &lt;Error&gt;\n    &lt;Type&gt;Sender&lt;/Type&gt;\n    &lt;Code&gt;ValidationError&lt;/Code&gt;\n    &lt;Message&gt;Stack with id serverless-rest-api-with-dynamodb-local does not exist&lt;/Message&gt;\n  &lt;/Error&gt;\n  &lt;RequestId&gt;cf4c737e-5ae2-11e4-a7c9-ad44eEXAMPLE&lt;/RequestId&gt;\n&lt;/ErrorResponse&gt;'
  localstack_1  | 2019-12-04T09:48:34:DEBUG:localstack.services.cloudformation.cloudformation_starter: Currently updating stack resource serverless-rest-api-with-dynamodb-local/ServerlessDeploymentBucket: None
  localstack_1  | 2019-12-04T09:48:34:ERROR:localstack.services.cloudformation.cloudformation_starter: Unable to parse and create resource "ServerlessDeploymentBucket": 400 Bad Request: &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  localstack_1  | &lt;Error&gt;
  localstack_1  |     &lt;Code&gt;InvalidBucketName&lt;/Code&gt;
  localstack_1  |     &lt;Message&gt;The specified bucket is not valid.&lt;/Message&gt;
  localstack_1  |     
  localstack_1  |     &lt;RequestID&gt;7a62c49f-347e-4fc4-9331-6e8eEXAMPLE&lt;/RequestID&gt;
  localstack_1  | &lt;/Error&gt; Traceback (most recent call last):
  localstack_1  |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 173, in parse_and_create_resource
  localstack_1  |     return _parse_and_create_resource(logical_id, resource_json, resources_map, region_name)
  localstack_1  |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_starter.py", line 229, in _parse_and_create_resource
  localstack_1  |     resource_json_arns_fixed, resources_map, region_name)
  localstack_1  |   File "/opt/code/localstack/.venv/lib/python3.7/site-packages/moto/cloudformation/parsing.py", line 306, in parse_and_create_resource
  localstack_1  |     resource_name, resource_json, region_name)
  localstack_1  |   File "/opt/code/localstack/.venv/lib/python3.7/site-packages/moto/s3/models.py", line 701, in create_from_cloudformation_json
  localstack_1  |     bucket = s3_backend.create_bucket(resource_name, region_name)
  localstack_1  |   File "/opt/code/localstack/.venv/lib/python3.7/site-packages/moto/s3/models.py", line 714, in create_bucket
  localstack_1  |     raise InvalidBucketName()
  localstack_1  | moto.s3.exceptions.InvalidBucketName: 400 Bad Request: &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  localstack_1  | &lt;Error&gt;
  localstack_1  |     &lt;Code&gt;InvalidBucketName&lt;/Code&gt;
  localstack_1  |     &lt;Message&gt;The specified bucket is not valid.&lt;/Message&gt;
  localstack_1  |     
  localstack_1  |     &lt;RequestID&gt;7a62c49f-347e-4fc4-9331-6e8eEXAMPLE&lt;/RequestID&gt;
  localstack_1  | &lt;/Error&gt;
  localstack_1  | 
  localstack_1  | 2019-12-04T09:48:34:DEBUG:localstack.services.cloudformation.cloudformation_listener: Error response from CloudFormation (400) POST /: b'&lt;?xml version="1.0" encoding="UTF-8"?&gt;\n&lt;Error&gt;\n    &lt;Code&gt;InvalidBucketName&lt;/Code&gt;\n    &lt;Message&gt;The specified bucket is not valid.&lt;/Message&gt;\n    \n    &lt;RequestID&gt;7a62c49f-347e-4fc4-9331-6e8eEXAMPLE&lt;/RequestID&gt;\n&lt;/Error&gt;'
  </code></pre>
  
  <p>Is there a missing config in <code>serverless.yml</code> for the localstack plugin to work ?</p>
  
  <p>The command I use for deploying is:</p>
  
  <blockquote>
    <p>SLS_DEBUG=3 serverless deploy --stage local --region us-east-1</p>
  </blockquote>