'Is there a good way of setting up a serverless-framework build utilizing codebuild to deploy lambda Layers

What I'm trying to do is deploy a repository with the dependencies marked in the aws-abstraction-services-layer and have it build through serverless deploy during the build using codebuild on AWS. Wasn't sure if it was attempted before but would love to find more info on solution someone else may have done themselves.

serverless.yml

provider:
  name: aws
  runtime: python3.8
  region: us-west-1
  iamRoleStatements: 
    - Effect: Allow
      Action:
        - s3:PutObject
        - s3:GetObject
      Resource: "*"
    - Effect: Allow
      Action:
        - cloudformation:DescribeStacks
      Resource: "*"
    - Effect: Allow
      Action:
        - lambda:PublishLayerVersion
      Resource: "*"
layers:
  aws-abstraction-services-layer:
    # name: aws-abstraction-services-layer
    path: aws-abstraction-layer

plugins:
  - serverless-layers
  - serverless-python-requirements

buildspec.yml

phases:
  install:
    runtime-versions:
      nodejs: 12
      python: 3.8
    commands:
      - npm install -g serverless
      - npm install
      - serverless plugin install --name serverless-python-requirements
      - pip install requests
  build:
    commands:
      - serverless deploy


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source