Lamda layer deployment from S3 URI artifact

I’m creating a Lambda layer from a public artifact:

https://aws-data-wrangler.readthedocs.io/en/2.10.0/install.html#public-artifacts

I can create the layer via serverless after downloading the .zip file to my local:

layers:
  AwsDataWrangler:
    package:
      artifact: awswrangler-layer-2.10.0-py3.8.zip

That works fine, but I’d like to be able pull the artifact from their pubic S3 bucket during packaging and deployment with something like…

layers:
  AwsDataWrangler:
    package:
      artifact: s3://aws-data-wrangler-public-artifacts/releases/2.10.0/awswrangler-layer-2.10.0-py3.8.zip

The following documentation pages suggest that I should be able to reference an artifact hosted in S3 with the above syntax: https://www.serverless.com/framework/docs/providers/aws/guide/packaging/. But I get the following error when I try:

  [OperationalError: ENOENT: no such file or directory, open 's3://aws-data-wrangler-public-artifacts/releases/2.10.0/awswrangler-layer-2.10.0-py3.8.zip'] {
    cause: [Error: ENOENT: no such file or directory, open 's3://aws-data-wrangler-public-artifacts/releases/2.10.0/awswrangler-layer-2.10.0-py3.8.zip'] {
      errno: -2,
      code: 'ENOENT',
      syscall: 'open',
      path: 's3://aws-data-wrangler-public-artifacts/releases/2.10.0/awswrangler-layer-2.10.0-py3.8.zip'
    },
    isOperational: true,
    errno: -2,
    code: 'ENOENT',
    syscall: 'open',
    path: 's3://aws-data-wrangler-public-artifacts/releases/2.10.0/awswrangler-layer-2.10.0-py3.8.zip'
  }

The doc page linked above says that S3 artifacts are supported for “service-wide and function-level artifact setups”, so I’m wondering if this just isn’t supported for Lambda Layers or if I’m just doing it wrong.

I didn’t find an answer to this specific questions, but I found that I could accomplish the same this using an AWS::Serverless::Application model. The layer I was interested is available, so I could add…

Transform: AWS::Serverless-2016-10-31
Resources:
  AwsDataWranglerLayers:
    Type: AWS::Serverless::Application
    Properties:
      Location:
        ApplicationId: arn:aws:serverlessrepo:us-east-1:336392948345:applications/aws-data-wrangler-layers
         # Find latest from github.com/awslabs/aws-data-wrangler/releases
        SemanticVersion: 2.10.0

And in the Lambda function definition:

  layers:
    - !GetAtt AwsDataWranglerLayers.Outputs.WranglerLayer38Arn

https://serverlessrepo.aws.amazon.com/applications/us-east-1/336392948345/aws-data-wrangler-layers