While working on a multi-stack AWS SAM package I came across this rather obscure error:
Error: Unable to upload artifact ../../spa-hosting.yaml referenced by Location parameter of Hosting resource. ‘S3Uploader’ object is not subscriptable
After an embarrassing amount of troubleshooting, the culprit turns out to be the Metadata[AWS::ServerlessRepo::Application]
element in the nested stack.
The nested stack is also published to the Serverless Application Repository, but I copied the template into this project for some additional customizations. As soon as I removed that element, the stack deployed correctly.
1 | # template.yaml |
1 | # spa-hosting.yaml |
I hope this saves somebody some headaches!
-Ivan