With the following serverless.yml file:
```yml
service: localtest

provider:
  name: aws
  runtime: nodejs10.x

functions:
  hello:
    handler: handler.hello
    events:
    - stream:
        type: dynamodb
        arn:
          Fn::GetAtt: [fooTable, StreamArn]

resources:
  Resources:
    fooTable:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: fooTable
        AttributeDefinitions:
          - AttributeName: foo
            AttributeType: S
        KeySchema:
          - AttributeName: foo
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
        StreamSpecification:
          StreamViewType: NEW_AND_OLD_IMAGES

plugins:
- "serverless-localstack"

custom:
  localstack:
    stages:
      - "local"
```
It fails with a generic error (500) on the deployment end and with `:ERROR:localstack.services.cloudformation.cloudformation_starter: Unable to parse and create resource "HelloEventSourceMappingDynamodbFooTable": 'NoneType' object has no attribute 'function_arn'` on the localstack end.
It deploys fine to AWS.
"""Recursive chmod"""
    os.chmod(path, mode)
    for root, dirnames, filenames in os.walk(path):
        for dirname in dirnames:
            os.chmod(os.path.join(root, dirname), mode)
        for filename in filenames:
            os.chmod(os.path.join(root, filename), mode)
def rm_rf(path):
    """
    Recursively removes a file or directory
    """
    if not path or not os.path.exists(path):
        return
    
    chmod_r(path, 0o777)
    
    exists_but_non_dir = os.path.exists(path) and not os.path.isdir(path)
    if os.path.isfile(path) or exists_but_non_dir:
        os.remove(path)
    else:
        shutil.rmtree(path)
def cp_r(src, dst):
    """Recursively copies file/directory"""
    if os.path.isfile(src):
        shutil.copy(src, dst)
    else:
        shutil.copytree(src, dst)
def download(url, path, verify_ssl=True):