Open johnbona opened 7 months ago
@johnbona Can you review #333 and let us know if this implementation would match your needs. I'm curious to learn about the requirement for the directory name. Can you customize it on PhoneNumberKit side ? Or is it expected to be a specific name ?
Expected behavior
Hello!
We're looking to utilize PhoneNumberKit which packages Google's libphonenumber metadata for phone number validation.
When archiving the project using the built-in AWSLambdaPackager plugin, the project successfully compiles and generates the .zip to upload to AWS. Given that PhoneNumberKit declares the Google libphonenumber metadata as a resource for the target, it's expected that AWSLambdaPackager would include the resource in the generated .zip file.
For reference, the swift-lambda project added support for SPM resources with this commit: https://github.com/SwiftXcode/swift-lambda/commit/dac42bc867319cfe7d48fd4f39f12a6468c0274c
Actual behavior
The AWSLambdaPackager plugin does not include SPM resources in the .zip and at runtime, the lambda crashes with the following error:
Steps to reproduce
let phoneNumberKit = PhoneNumberKit()
If possible, minimal yet complete reproducer code (or URL to code)
No response
What version of this project (
swift-aws-lambda-runtime
) are you using?main
Swift version
Amazon Linux 2 docker image version
5.9-amazonlinux2