Cannot use the AWS iOS SDK as a dependency of a package

I had some code in my app to handle uploads to AWS that I wanted to extract to it's own package.
This code has a dependency to the AWS iOS Swift SDK at GitHub - aws-amplify/aws-sdk-ios-spm: This repository enables Swift Package Manager support for the AWS Mobile SDK for iOS

In my app, the AWS package works just fine, but once I packaged all my code, and tried to add the AWS package as a dependency, I could not make it work, the dependency package would download, but there seemed no way to add it to any target. I would get errors similar to

"product AWSiOSSDKV2 required by package aws-sdk-test-package target aws-sdk-test-target not found"

I tried various different targets, products strings etc from what I could find in the AWS package file, but nothing would work

It can be recreated with any simple package structure, here is my swift.package file

// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "aws-sdk-test-package",
    platforms: [
    products: [
        // Products define the executables and libraries a package produces, making them visible to other packages.
            name: "aws-sdk-test-package",
            targets: ["aws-sdk-test-package"]),
    dependencies: [
        .package(url: "", from: .init(2, 34, 0))
    targets: [
        // Targets are the basic building blocks of a package, defining a module or a test suite.
        // Targets can depend on other targets in this package and products from dependencies.
            name: "aws-sdk-test-package",
        dependencies: [
            // Things that didn't work
            // "aws-sdk-ios-spm",
            // "AWSCore",
            // .product(name: "AWSCore"),
            // .target(name: "AWSCore")
            name: "aws-sdk-test-packageTests",
            dependencies: ["aws-sdk-test-package"]),

The AWS package does some code to create it's targets and products, I suspect it is the issue, is there a way it will work?

Should have done it in the first place but I raised an issue on their github page : It doesn't seem possible to use this package as a dependency of another · Issue #115 · aws-amplify/aws-sdk-ios-spm · GitHub

And the answer is to use

            .product(name: "AWSCore", package: "aws-sdk-ios-spm")