Closed bguyza closed 2 years ago
@bguyza For you sam build
command, why is it using the .aws-sam
template? You shouldn't be passing that template to build at all and instead want to be using sam build
on your source.
Thanks for taking a look @jfuss .
The sam build
command, arguments, and the template are generated by the AWS Toolkit plugin configuration when the "From handler" option is selected. (ex. https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/run-debug-configurations-dialog-local.html).
Is this not the correct invocation?
@bguyza That would be a better question for the AWS Toolkit: https://github.com/aws/aws-toolkit-jetbrains
What is happening is: sam build
is getting passed a -t
. This is not bad but only required if you have a custom template, though the Toolkit maybe doing this for a specific reason. What is off in the -t
option is that it has the .aws-sam/
in the path. This means you are building the "built" template. Which will embed another .aws-sam
directory with the actual built templates.
So something seems to be off either with the AWS Toolkit or how you are configuring it to run.
@jfuss
I figured it out. The size of my function (dependencies to be precise) was too large. Trying to call update-function-code
via aws-cli will yield the error:
An error occurred (InvalidParameterValueException) when calling the UpdateFunctionCode operation: Unzipped size must be smaller than 249053561 bytes
I'm not certain, but I'm guessing that aws-sam-cli does not fail on this condition and legitimately can't find run-time dependencies.
Description:
When running
sam local invoke
from AWS Toolkit run configuration, dependencies are not being resolved.Steps to reproduce:
SAM CLI, version 1.55.0 gradle 7.5
Run Configuration:
Observed result: