aws / aws-sam-cli

CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
https://aws.amazon.com/serverless/sam/
Apache License 2.0
6.52k stars 1.17k forks source link

Dependencies are not found when invoking sam local #4144

Closed bguyza closed 2 years ago

bguyza commented 2 years ago

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:


docker ps
/opt/homebrew/Cellar/aws-sam-cli/1.55.0/libexec/bin/sam build Function --template /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/temp-template.yaml --build-dir /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build --debug

2022-08-24 11:24:36,995 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2022-08-24 11:24:36,995 | Using config file: samconfig.toml, config environment: default
2022-08-24 11:24:36,995 | Expand command line arguments to:
2022-08-24 11:24:36,995 | --template_file=/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/temp-template.yaml --build_dir=/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build --base_dir=/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam --resource_logical_id=Function --cache_dir=.aws-sam/cache 
2022-08-24 11:24:37,287 | 'build' command is called
2022-08-24 11:24:37,288 | No Parameters detected in the template
2022-08-24 11:24:37,296 | There is no customer defined id or cdk path defined for resource Function, so we will use the resource logical id as the resource id
2022-08-24 11:24:37,296 | 0 stacks found in the template
2022-08-24 11:24:37,296 | No Parameters detected in the template
2022-08-24 11:24:37,301 | There is no customer defined id or cdk path defined for resource Function, so we will use the resource logical id as the resource id
2022-08-24 11:24:37,301 | 1 resources found in the stack 
2022-08-24 11:24:37,301 | Found Serverless function with name='Function' and CodeUri='/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction'
2022-08-24 11:24:37,346 | Instantiating build definitions
2022-08-24 11:24:37,346 | No previous build graph found, generating new one
2022-08-24 11:24:37,346 | Unique function build definition found, adding as new (Function Build Definition: BuildDefinition(java11, /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction, Zip, , 7affc68d-fb72-47e6-983e-6533215f93ec, {}, {}, arm64, []), Function: Function(function_id='Function', name='Function', functionname='Function', runtime='java11', memory=320, timeout=300, handler='com.my.fully.qualified.package.MyLambdaFunction::handleRequest', imageuri=None, packagetype='Zip', imageconfig=None, codeuri='/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction', environment=None, rolearn=None, layers=[], events=None, metadata={'SamResourceId': 'Function'}, inlinecode=None, codesign_config_arn=None, architectures=['arm64'], function_url_config=None, stack_path=''))
2022-08-24 11:24:37,346 | Building codeuri: /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction runtime: java11 metadata: {} architecture: arm64 functions: Function
2022-08-24 11:24:37,346 | Building to following folder /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function
2022-08-24 11:24:37,346 | Looking for a supported build workflow in following directories: ['/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction', '/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam']
2022-08-24 11:24:37,347 | Loading workflow module 'aws_lambda_builders.workflows'
2022-08-24 11:24:37,351 | Registering workflow 'PythonPipBuilder' with capability 'Capability(language='python', dependency_manager='pip', application_framework=None)'
2022-08-24 11:24:37,356 | Registering workflow 'NodejsNpmBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm', application_framework=None)'
2022-08-24 11:24:37,358 | Registering workflow 'RubyBundlerBuilder' with capability 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
2022-08-24 11:24:37,360 | Registering workflow 'GoModulesBuilder' with capability 'Capability(language='go', dependency_manager='modules', application_framework=None)'
2022-08-24 11:24:37,364 | Registering workflow 'JavaGradleWorkflow' with capability 'Capability(language='java', dependency_manager='gradle', application_framework=None)'
2022-08-24 11:24:37,367 | Registering workflow 'JavaMavenWorkflow' with capability 'Capability(language='java', dependency_manager='maven', application_framework=None)'
2022-08-24 11:24:37,370 | Registering workflow 'DotnetCliPackageBuilder' with capability 'Capability(language='dotnet', dependency_manager='cli-package', application_framework=None)'
2022-08-24 11:24:37,373 | Registering workflow 'CustomMakeBuilder' with capability 'Capability(language='provided', dependency_manager=None, application_framework=None)'
2022-08-24 11:24:37,375 | Registering workflow 'NodejsNpmEsbuildBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm-esbuild', application_framework=None)'
2022-08-24 11:24:37,375 | Found workflow 'JavaGradleWorkflow' to support capabilities 'Capability(language='java', dependency_manager='gradle', application_framework=None)'
2022-08-24 11:24:37,739 | Running workflow 'JavaGradleWorkflow'
2022-08-24 11:24:37,739 | Running JavaGradleWorkflow:GradleBuild
2022-08-24 11:24:43,445 | JavaGradleWorkflow:GradleBuild succeeded
2022-08-24 11:24:43,445 | Running JavaGradleWorkflow:JavaGradleCopyArtifacts
2022-08-24 11:24:43,446 | Creating target folders at /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/META-INF
2022-08-24 11:24:43,446 | Copying directory metadata from source (/tmp/tmpo9jxagla/b2cefef59a3f68a137609f9431c93debec39f6d9/build/distributions/lambda-build/META-INF) to destination (/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/META-INF)
2022-08-24 11:24:43,447 | Copying source file (/tmp/tmpo9jxagla/b2cefef59a3f68a137609f9431c93debec39f6d9/build/distributions/lambda-build/META-INF/MANIFEST.MF) to destination (/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/META-INF/MANIFEST.MF)
2022-08-24 11:24:43,448 | Creating target folders at /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/lib
2022-08-24 11:24:43,448 | Copying directory metadata from source (/tmp/tmpo9jxagla/b2cefef59a3f68a137609f9431c93debec39f6d9/build/distributions/lambda-build/lib) to destination (/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/lib)
2022-08-24 11:24:43,449 | Copying source file (/tmp/tmpo9jxagla/b2cefef59a3f68a137609f9431c93debec39f6d9/build/distributions/lambda-build/lib/jackson-core-2.12.6.jar) to destination (/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/lib/jackson-core-2.12.6.jar)
2022-08-24 11:24:43,450 | Copying source file (/tmp/tmpo9jxagla/b2cefef59a3f68a137609f9431c93debec39f6d9/build/distributions/lambda-build/lib/aws-java-sdk-clouddirectory-1.12.228.jar) to destination (/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/lib/aws-java-sdk-clouddirectory-1.12.228.jar)
2022-08-24 11:24:43,451 | Copying source file (/tmp/tmpo9jxagla/b2cefef59a3f68a137609f9431c93debec39f6d9/build/distributions/lambda-build/lib/aws-java-sdk-amplifyuibuilder-1.12.228.jar) to destination (/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/lib/aws-java-sdk-amplifyuibuilder-1.12.228.jar)
2022-08-24 11:24:43,452 | Copying source file (/tmp/tmpo9jxagla/b2cefef59a3f68a137609f9431c93debec39f6d9/build/distributions/lambda-build/lib/aws-java-sdk-codecommit-1.12.228.jar) to destination (/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/lib/aws-java-sdk-codecommit-1.12.228.jar)
2022-08-24 11:24:43,454 | Copying source file (/tmp/tmpo9jxagla/b2cefef59a3f68a137609f9431c93debec39f6d9/build/distributions/lambda-build/lib/annotations-4.1.1.4.jar) to destination (/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/lib/annotations-4.1.1.4.jar)
2022-08-24 11:24:43,454 | Copying source file (/tmp/tmpo9jxagla/b2cefef59a3f68a137609f9431c93debec39f6d9/build/distributions/lambda-build/lib/aws-java-sdk-backupgateway-1.12.228.jar) to destination (/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function/lib/aws-java-sdk-backupgateway-1.12.228.jar)

Build Succeeded

Built Artifacts  : build
Built Template   : build/template.yaml

Commands you can use next
=========================
[*] Validate SAM template: sam validate
[*] Invoke Function: sam local invoke -t build/template.yaml
[*] Test Function in the Cloud: sam sync --stack-name {stack-name} --watch
[*] Deploy: sam deploy --guided --template-file build/template.yaml

2022-08-24 11:24:43,737 | There is no customer defined id or cdk path defined for resource Function, so we will use the resource logical id as the resource id
2022-08-24 11:24:43,740 | Sending Telemetry: {'metrics': [{'commandRun': {'requestId': '863a895c-2b5b-4e9c-8a25-9ce828271174', 'installationId': 'f4192455-a93b-4e41-a55f-0f373812337e', 'sessionId': '8836f96d-bd5d-4ee7-9c25-329f8b1c875f', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.8.13', 'samcliVersion': '1.55.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam build', 'metricSpecificAttributes': {'projectType': 'CFN'}, 'duration': 6744, 'exitReason': 'success', 'exitCode': 0}}]}
2022-08-24 11:24:43,896 | Telemetry response: 500
/opt/homebrew/Cellar/aws-sam-cli/1.55.0/libexec/bin/sam local invoke --template /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/template.yaml --event "/private/var/folders/bw/t5mjcvfn3r59n5bjj1q7s6180000gq/T/[Local] My test lambda-event7.json" --debug
2022-08-24 11:24:44,437 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2022-08-24 11:24:44,437 | Using config file: samconfig.toml, config environment: default
2022-08-24 11:24:44,437 | Expand command line arguments to:
2022-08-24 11:24:44,437 | --template_file=/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/template.yaml --event=/private/var/folders/bw/t5mjcvfn3r59n5bjj1q7s6180000gq/T/[Local] My test lambda-event7.json --no_event --layer_cache_basedir=/Users/bguyza/.aws-sam/layers-pkg --container_host=localhost --container_host_interface=127.0.0.1 
2022-08-24 11:24:44,437 | local invoke command is called
2022-08-24 11:24:44,438 | No Parameters detected in the template
2022-08-24 11:24:44,447 | Sam customer defined id is more priority than other IDs. Customer defined id for resource Function is Function
2022-08-24 11:24:44,447 | 0 stacks found in the template
2022-08-24 11:24:44,447 | No Parameters detected in the template
2022-08-24 11:24:44,452 | Sam customer defined id is more priority than other IDs. Customer defined id for resource Function is Function
2022-08-24 11:24:44,452 | 1 resources found in the stack 
2022-08-24 11:24:44,452 | Found Serverless function with name='Function' and CodeUri='Function'
2022-08-24 11:24:44,452 | --base-dir is not presented, adjusting uri Function relative to /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/template.yaml
2022-08-24 11:24:44,466 | Found one Lambda function with name 'Function'
2022-08-24 11:24:44,466 | Invoking com.my.fully.qualified.package.MyLambdaFunction::handleRequest (java11)
2022-08-24 11:24:44,466 | No environment variables found for function 'Function'
2022-08-24 11:24:44,466 | Environment variables overrides data is standard format
2022-08-24 11:24:44,466 | Loading AWS credentials from session with profile 'None'
2022-08-24 11:24:44,477 | Resolving code path. Cwd=/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build, CodeUri=/Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function
2022-08-24 11:24:44,477 | Resolved absolute path to code is /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function
2022-08-24 11:24:44,477 | Code /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function is not a zip/jar file
2022-08-24 11:24:44,499 | Skip pulling image and use local one: public.ecr.aws/sam/emulation-java11:rapid-1.55.0-arm64.

2022-08-24 11:24:44,499 | Mounting /Users/bguyza/MyLambdaRoot/lambdas/MyLambdaFunction/build/generated/sources/annotationProcessor/java/main/.aws-sam/build/Function as /var/task:ro,delegated inside runtime container
2022-08-24 11:24:46,517 | Starting a timer for 300 seconds for function 'Function'
START RequestId: 46277f6b-7880-4474-88ce-e386e6921eb9 Version: $LATEST
Error loading method handleRequest on class com.my.fully.qualified.package.MyLambdaFunction: java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError: com/amazonaws/services/lambda/runtime/events/SQSEvent
    at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.base/java.lang.Class.privateGetPublicMethods(Unknown Source)
    at java.base/java.lang.Class.getMethods(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.amazonaws.services.lambda.runtime.events.SQSEvent. Current classpath: file:/var/task/:file:/var/task/lib/animal-sniffer-annotations-1.19.jar:file:/var/task/lib/annotations-22.0.0.jar:file:/var/task/lib/annotations-4.1.1.4.jar:file:/var/task/lib/apiguardian-api-1.1.0.jar:file:/var/task/lib/asm-7.1.jar:file:/var/task/lib/asm-analysis-7.1.jar:file:/var/task/lib/asm-commons-7.1.jar:file:/var/task/lib/asm-tree-7.1.jar:file:/var/task/lib/asm-util-7.1.jar:file:/var/task/lib/aws-java-sdk-1.12.228.jar:file:/var/task/lib/aws-java-sdk-accessanalyzer-1.12.228.jar:file:/var/task/lib/aws-java-sdk-account-1.12.228.jar:file:/var/task/lib/aws-java-sdk-acm-1.12.228.jar:file:/var/task/lib/aws-java-sdk-acmpca-1.12.228.jar:file:/var/task/lib/aws-java-sdk-alexaforbusiness-1.12.228.jar:file:/var/task/lib/aws-java-sdk-amplify-1.12.228.jar:file:/var/task/lib/aws-java-sdk-amplifybackend-1.12.228.jar:file:/var/task/lib/aws-java-sdk-amplifyuibuilder-1.12.228.jar:file:/var/task/lib/aws-java-sdk-api-gateway-1.12.228.jar:file:/var/task/lib/aws-java-sdk-apigatewaymanagementapi-1.12.228.jar:file:/var/task/lib/aws-java-sdk-apigatewayv2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-appconfig-1.12.228.jar:file:/var/task/lib/aws-java-sdk-appconfigdata-1.12.228.jar:file:/var/task/lib/aws-java-sdk-appflow-1.12.228.jar:file:/var/task/lib/aws-java-sdk-appintegrations-1.12.228.jar:file:/var/task/lib/aws-java-sdk-applicationautoscaling-1.12.228.jar:file:/var/task/lib/aws-java-sdk-applicationcostprofiler-1.12.228.jar:file:/var/task/lib/aws-java-sdk-applicationinsights-1.12.228.jar:file:/var/task/lib/aws-java-sdk-appmesh-1.12.228.jar:file:/var/task/lib/aws-java-sdk-appregistry-1.12.228.jar:file:/var/task/lib/aws-java-sdk-apprunner-1.12.228.jar:file:/var/task/lib/aws-java-sdk-appstream-1.12.228.jar:file:/var/task/lib/aws-java-sdk-appsync-1.12.228.jar:file:/var/task/lib/aws-java-sdk-athena-1.12.228.jar:file:/var/task/lib/aws-java-sdk-auditmanager-1.12.228.jar:file:/var/task/lib/aws-java-sdk-augmentedairuntime-1.12.228.jar:file:/var/task/lib/aws-java-sdk-autoscaling-1.12.228.jar:file:/var/task/lib/aws-java-sdk-autoscalingplans-1.12.228.jar:file:/var/task/lib/aws-java-sdk-backup-1.12.228.jar:file:/var/task/lib/aws-java-sdk-backupgateway-1.12.228.jar:file:/var/task/lib/aws-java-sdk-batch-1.12.228.jar:file:/var/task/lib/aws-java-sdk-billingconductor-1.12.228.jar:file:/var/task/lib/aws-java-sdk-braket-1.12.228.jar:file:/var/task/lib/aws-java-sdk-budgets-1.12.228.jar:file:/var/task/lib/aws-java-sdk-chime-1.12.228.jar:file:/var/task/lib/aws-java-sdk-chimesdkidentity-1.12.228.jar:file:/var/task/lib/aws-java-sdk-chimesdkmediapipelines-1.12.228.jar:file:/var/task/lib/aws-java-sdk-chimesdkmeetings-1.12.228.jar:file:/var/task/lib/aws-java-sdk-chimesdkmessaging-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloud9-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudcontrolapi-1.12.228.jar:file:/var/task/lib/aws-java-sdk-clouddirectory-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudformation-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudfront-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudhsm-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudhsmv2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudsearch-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudtrail-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudwatch-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudwatchevidently-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudwatchmetrics-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cloudwatchrum-1.12.228.jar:file:/var/task/lib/aws-java-sdk-codeartifact-1.12.228.jar:file:/var/task/lib/aws-java-sdk-codebuild-1.12.228.jar:file:/var/task/lib/aws-java-sdk-codecommit-1.12.228.jar:file:/var/task/lib/aws-java-sdk-codedeploy-1.12.228.jar:file:/var/task/lib/aws-java-sdk-codeguruprofiler-1.12.228.jar:file:/var/task/lib/aws-java-sdk-codegurureviewer-1.12.228.jar:file:/var/task/lib/aws-java-sdk-codepipeline-1.12.228.jar:file:/var/task/lib/aws-java-sdk-codestar-1.12.228.jar:file:/var/task/lib/aws-java-sdk-codestarconnections-1.12.228.jar:file:/var/task/lib/aws-java-sdk-codestarnotifications-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cognitoidentity-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cognitoidp-1.12.228.jar:file:/var/task/lib/aws-java-sdk-cognitosync-1.12.228.jar:file:/var/task/lib/aws-java-sdk-comprehend-1.12.228.jar:file:/var/task/lib/aws-java-sdk-comprehendmedical-1.12.228.jar:file:/var/task/lib/aws-java-sdk-computeoptimizer-1.12.228.jar:file:/var/task/lib/aws-java-sdk-config-1.12.228.jar:file:/var/task/lib/aws-java-sdk-connect-1.12.228.jar:file:/var/task/lib/aws-java-sdk-connectcontactlens-1.12.228.jar:file:/var/task/lib/aws-java-sdk-connectparticipant-1.12.228.jar:file:/var/task/lib/aws-java-sdk-connectwisdom-1.12.228.jar:file:/var/task/lib/aws-java-sdk-core-1.12.228.jar:file:/var/task/lib/aws-java-sdk-costandusagereport-1.12.228.jar:file:/var/task/lib/aws-java-sdk-costexplorer-1.12.228.jar:file:/var/task/lib/aws-java-sdk-customerprofiles-1.12.228.jar:file:/var/task/lib/aws-java-sdk-dataexchange-1.12.228.jar:file:/var/task/lib/aws-java-sdk-datapipeline-1.12.228.jar:file:/var/task/lib/aws-java-sdk-datasync-1.12.228.jar:file:/var/task/lib/aws-java-sdk-dax-1.12.228.jar:file:/var/task/lib/aws-java-sdk-detective-1.12.228.jar:file:/var/task/lib/aws-java-sdk-devicefarm-1.12.228.jar:file:/var/task/lib/aws-java-sdk-devopsguru-1.12.228.jar:file:/var/task/lib/aws-java-sdk-directconnect-1.12.228.jar:file:/var/task/lib/aws-java-sdk-directory-1.12.228.jar:file:/var/task/lib/aws-java-sdk-discovery-1.12.228.jar:file:/var/task/lib/aws-java-sdk-dlm-1.12.228.jar:file:/var/task/lib/aws-java-sdk-dms-1.12.228.jar:file:/var/task/lib/aws-java-sdk-docdb-1.12.228.jar:file:/var/task/lib/aws-java-sdk-drs-1.12.228.jar:file:/var/task/lib/aws-java-sdk-dynamodb-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ebs-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ec2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ec2instanceconnect-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ecr-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ecrpublic-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ecs-1.12.228.jar:file:/var/task/lib/aws-java-sdk-efs-1.12.228.jar:file:/var/task/lib/aws-java-sdk-eks-1.12.228.jar:file:/var/task/lib/aws-java-sdk-elasticache-1.12.228.jar:file:/var/task/lib/aws-java-sdk-elasticbeanstalk-1.12.228.jar:file:/var/task/lib/aws-java-sdk-elasticinference-1.12.228.jar:file:/var/task/lib/aws-java-sdk-elasticloadbalancing-1.12.228.jar:file:/var/task/lib/aws-java-sdk-elasticloadbalancingv2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-elasticsearch-1.12.228.jar:file:/var/task/lib/aws-java-sdk-elastictranscoder-1.12.228.jar:file:/var/task/lib/aws-java-sdk-emr-1.12.228.jar:file:/var/task/lib/aws-java-sdk-emrcontainers-1.12.228.jar:file:/var/task/lib/aws-java-sdk-eventbridge-1.12.228.jar:file:/var/task/lib/aws-java-sdk-events-1.12.228.jar:file:/var/task/lib/aws-java-sdk-finspace-1.12.228.jar:file:/var/task/lib/aws-java-sdk-finspacedata-1.12.228.jar:file:/var/task/lib/aws-java-sdk-fis-1.12.228.jar:file:/var/task/lib/aws-java-sdk-fms-1.12.228.jar:file:/var/task/lib/aws-java-sdk-forecast-1.12.228.jar:file:/var/task/lib/aws-java-sdk-forecastquery-1.12.228.jar:file:/var/task/lib/aws-java-sdk-frauddetector-1.12.228.jar:file:/var/task/lib/aws-java-sdk-fsx-1.12.228.jar:file:/var/task/lib/aws-java-sdk-gamelift-1.12.228.jar:file:/var/task/lib/aws-java-sdk-gamesparks-1.12.228.jar:file:/var/task/lib/aws-java-sdk-glacier-1.12.228.jar:file:/var/task/lib/aws-java-sdk-globalaccelerator-1.12.228.jar:file:/var/task/lib/aws-java-sdk-glue-1.12.228.jar:file:/var/task/lib/aws-java-sdk-gluedatabrew-1.12.228.jar:file:/var/task/lib/aws-java-sdk-greengrass-1.12.228.jar:file:/var/task/lib/aws-java-sdk-greengrassv2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-groundstation-1.12.228.jar:file:/var/task/lib/aws-java-sdk-guardduty-1.12.228.jar:file:/var/task/lib/aws-java-sdk-health-1.12.228.jar:file:/var/task/lib/aws-java-sdk-healthlake-1.12.228.jar:file:/var/task/lib/aws-java-sdk-honeycode-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iam-1.12.228.jar:file:/var/task/lib/aws-java-sdk-identitystore-1.12.228.jar:file:/var/task/lib/aws-java-sdk-imagebuilder-1.12.228.jar:file:/var/task/lib/aws-java-sdk-importexport-1.12.228.jar:file:/var/task/lib/aws-java-sdk-inspector-1.12.228.jar:file:/var/task/lib/aws-java-sdk-inspector2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iot-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iot1clickdevices-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iot1clickprojects-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iotanalytics-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iotdeviceadvisor-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iotevents-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ioteventsdata-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iotfleethub-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iotjobsdataplane-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iotsecuretunneling-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iotsitewise-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iotthingsgraph-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iottwinmaker-1.12.228.jar:file:/var/task/lib/aws-java-sdk-iotwireless-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ivs-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ivschat-1.12.228.jar:file:/var/task/lib/aws-java-sdk-kafka-1.12.228.jar:file:/var/task/lib/aws-java-sdk-kafkaconnect-1.12.228.jar:file:/var/task/lib/aws-java-sdk-kendra-1.12.228.jar:file:/var/task/lib/aws-java-sdk-keyspaces-1.12.228.jar:file:/var/task/lib/aws-java-sdk-kinesis-1.12.228.jar:file:/var/task/lib/aws-java-sdk-kinesisanalyticsv2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-kinesisvideo-1.12.228.jar:file:/var/task/lib/aws-java-sdk-kinesisvideosignalingchannels-1.12.228.jar:file:/var/task/lib/aws-java-sdk-kms-1.12.228.jar:file:/var/task/lib/aws-java-sdk-lakeformation-1.12.228.jar:file:/var/task/lib/aws-java-sdk-lambda-1.12.228.jar:file:/var/task/lib/aws-java-sdk-lex-1.12.228.jar:file:/var/task/lib/aws-java-sdk-lexmodelbuilding-1.12.228.jar:file:/var/task/lib/aws-java-sdk-lexmodelsv2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-lexruntimev2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-licensemanager-1.12.228.jar:file:/var/task/lib/aws-java-sdk-lightsail-1.12.228.jar:file:/var/task/lib/aws-java-sdk-location-1.12.228.jar:file:/var/task/lib/aws-java-sdk-logs-1.12.228.jar:file:/var/task/lib/aws-java-sdk-lookoutequipment-1.12.228.jar:file:/var/task/lib/aws-java-sdk-lookoutforvision-1.12.228.jar:file:/var/task/lib/aws-java-sdk-lookoutmetrics-1.12.228.jar:file:/var/task/lib/aws-java-sdk-machinelearning-1.12.228.jar:file:/var/task/lib/aws-java-sdk-macie-1.12.228.jar:file:/var/task/lib/aws-java-sdk-macie2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-managedblockchain-1.12.228.jar:file:/var/task/lib/aws-java-sdk-managedgrafana-1.12.228.jar:file:/var/task/lib/aws-java-sdk-marketplacecatalog-1.12.228.jar:file:/var/task/lib/aws-java-sdk-marketplacecommerceanalytics-1.12.228.jar:file:/var/task/lib/aws-java-sdk-marketplaceentitlement-1.12.228.jar:file:/var/task/lib/aws-java-sdk-marketplacemeteringservice-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mechanicalturkrequester-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mediaconnect-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mediaconvert-1.12.228.jar:file:/var/task/lib/aws-java-sdk-medialive-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mediapackage-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mediapackagevod-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mediastore-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mediastoredata-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mediatailor-1.12.228.jar:file:/var/task/lib/aws-java-sdk-memorydb-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mgn-1.12.228.jar:file:/var/task/lib/aws-java-sdk-migrationhub-1.12.228.jar:file:/var/task/lib/aws-java-sdk-migrationhubconfig-1.12.228.jar:file:/var/task/lib/aws-java-sdk-migrationhubrefactorspaces-1.12.228.jar:file:/var/task/lib/aws-java-sdk-migrationhubstrategyrecommendations-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mobile-1.12.228.jar:file:/var/task/lib/aws-java-sdk-models-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mq-1.12.228.jar:file:/var/task/lib/aws-java-sdk-mwaa-1.12.228.jar:file:/var/task/lib/aws-java-sdk-neptune-1.12.228.jar:file:/var/task/lib/aws-java-sdk-networkfirewall-1.12.228.jar:file:/var/task/lib/aws-java-sdk-networkmanager-1.12.228.jar:file:/var/task/lib/aws-java-sdk-nimblestudio-1.12.228.jar:file:/var/task/lib/aws-java-sdk-opensearch-1.12.228.jar:file:/var/task/lib/aws-java-sdk-opsworks-1.12.228.jar:file:/var/task/lib/aws-java-sdk-opsworkscm-1.12.228.jar:file:/var/task/lib/aws-java-sdk-organizations-1.12.228.jar:file:/var/task/lib/aws-java-sdk-outposts-1.12.228.jar:file:/var/task/lib/aws-java-sdk-panorama-1.12.228.jar:file:/var/task/lib/aws-java-sdk-personalize-1.12.228.jar:file:/var/task/lib/aws-java-sdk-personalizeevents-1.12.228.jar:file:/var/task/lib/aws-java-sdk-personalizeruntime-1.12.228.jar:file:/var/task/lib/aws-java-sdk-pi-1.12.228.jar:file:/var/task/lib/aws-java-sdk-pinpoint-1.12.228.jar:file:/var/task/lib/aws-java-sdk-pinpointemail-1.12.228.jar:file:/var/task/lib/aws-java-sdk-pinpointsmsvoice-1.12.228.jar:file:/var/task/lib/aws-java-sdk-pinpointsmsvoicev2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-polly-1.12.228.jar:file:/var/task/lib/aws-java-sdk-pricing-1.12.228.jar:file:/var/task/lib/aws-java-sdk-prometheus-1.12.228.jar:file:/var/task/lib/aws-java-sdk-proton-1.12.228.jar:file:/var/task/lib/aws-java-sdk-qldb-1.12.228.jar:file:/var/task/lib/aws-java-sdk-qldbsession-1.12.228.jar:file:/var/task/lib/aws-java-sdk-quicksight-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ram-1.12.228.jar:file:/var/task/lib/aws-java-sdk-rds-1.12.228.jar:file:/var/task/lib/aws-java-sdk-rdsdata-1.12.228.jar:file:/var/task/lib/aws-java-sdk-recyclebin-1.12.228.jar:file:/var/task/lib/aws-java-sdk-redshift-1.12.228.jar:file:/var/task/lib/aws-java-sdk-redshiftdataapi-1.12.228.jar:file:/var/task/lib/aws-java-sdk-rekognition-1.12.228.jar:file:/var/task/lib/aws-java-sdk-resiliencehub-1.12.228.jar:file:/var/task/lib/aws-java-sdk-resourcegroups-1.12.228.jar:file:/var/task/lib/aws-java-sdk-resourcegroupstaggingapi-1.12.228.jar:file:/var/task/lib/aws-java-sdk-robomaker-1.12.228.jar:file:/var/task/lib/aws-java-sdk-route53-1.12.228.jar:file:/var/task/lib/aws-java-sdk-route53recoverycluster-1.12.228.jar:file:/var/task/lib/aws-java-sdk-route53recoverycontrolconfig-1.12.228.jar:file:/var/task/lib/aws-java-sdk-route53recoveryreadiness-1.12.228.jar:file:/var/task/lib/aws-java-sdk-route53resolver-1.12.228.jar:file:/var/task/lib/aws-java-sdk-s3-1.12.228.jar:file:/var/task/lib/aws-java-sdk-s3control-1.12.228.jar:file:/var/task/lib/aws-java-sdk-s3outposts-1.12.228.jar:file:/var/task/lib/aws-java-sdk-sagemaker-1.12.228.jar:file:/var/task/lib/aws-java-sdk-sagemakeredgemanager-1.12.228.jar:file:/var/task/lib/aws-java-sdk-sagemakerfeaturestoreruntime-1.12.228.jar:file:/var/task/lib/aws-java-sdk-sagemakerruntime-1.12.228.jar:file:/var/task/lib/aws-java-sdk-savingsplans-1.12.228.jar:file:/var/task/lib/aws-java-sdk-schemas-1.12.228.jar:file:/var/task/lib/aws-java-sdk-secretsmanager-1.12.228.jar:file:/var/task/lib/aws-java-sdk-securityhub-1.12.228.jar:file:/var/task/lib/aws-java-sdk-serverlessapplicationrepository-1.12.228.jar:file:/var/task/lib/aws-java-sdk-servermigration-1.12.228.jar:file:/var/task/lib/aws-java-sdk-servicecatalog-1.12.228.jar:file:/var/task/lib/aws-java-sdk-servicediscovery-1.12.228.jar:file:/var/task/lib/aws-java-sdk-servicequotas-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ses-1.12.228.jar:file:/var/task/lib/aws-java-sdk-sesv2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-shield-1.12.228.jar:file:/var/task/lib/aws-java-sdk-signer-1.12.228.jar:file:/var/task/lib/aws-java-sdk-simpledb-1.12.228.jar:file:/var/task/lib/aws-java-sdk-simpleworkflow-1.12.228.jar:file:/var/task/lib/aws-java-sdk-snowball-1.12.228.jar:file:/var/task/lib/aws-java-sdk-snowdevicemanagement-1.12.228.jar:file:/var/task/lib/aws-java-sdk-sns-1.12.228.jar:file:/var/task/lib/aws-java-sdk-sqs-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ssm-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ssmcontacts-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ssmincidents-1.12.228.jar:file:/var/task/lib/aws-java-sdk-sso-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ssoadmin-1.12.228.jar:file:/var/task/lib/aws-java-sdk-ssooidc-1.12.228.jar:file:/var/task/lib/aws-java-sdk-stepfunctions-1.12.228.jar:file:/var/task/lib/aws-java-sdk-storagegateway-1.12.228.jar:file:/var/task/lib/aws-java-sdk-sts-1.12.228.jar:file:/var/task/lib/aws-java-sdk-support-1.12.228.jar:file:/var/task/lib/aws-java-sdk-swf-libraries-1.11.22.jar:file:/var/task/lib/aws-java-sdk-synthetics-1.12.228.jar:file:/var/task/lib/aws-java-sdk-textract-1.12.228.jar:file:/var/task/lib/aws-java-sdk-timestreamquery-1.12.228.jar:file:/var/task/lib/aws-java-sdk-timestreamwrite-1.12.228.jar:file:/var/task/lib/aws-java-sdk-transcribe-1.12.228.jar:file:/var/task/lib/aws-java-sdk-transfer-1.12.228.jar:file:/var/task/lib/aws-java-sdk-translate-1.12.228.jar:file:/var/task/lib/aws-java-sdk-voiceid-1.12.228.jar:file:/var/task/lib/aws-java-sdk-waf-1.12.228.jar:file:/var/task/lib/aws-java-sdk-wafv2-1.12.228.jar:file:/var/task/lib/aws-java-sdk-wellarchitected-1.12.228.jar:file:/var/task/lib/aws-java-sdk-workdocs-1.12.228.jar:file:/var/task/lib/aws-java-sdk-worklink-1.12.228.jar:file:/var/task/lib/aws-java-sdk-workmail-1.12.228.jar:file:/var/task/lib/aws-java-sdk-workmailmessageflow-1.12.228.jar:file:/var/task/lib/aws-java-sdk-workspaces-1.12.228.jar:file:/var/task/lib/aws-java-sdk-workspacesweb-1.12.228.jar:file:/var/task/lib/aws-java-sdk-xray-1.12.228.jar:file:/var/task/lib/aws-lambda-java-core-1.2.1.jar:file:/var/task/lib/aws-lambda-java-events-3.11.0.jar:file:/var/task/lib/aws-lambda-java-log4j2-1.5.0.jar:file:/var/task/lib/aws-lambda-java-serialization-1.0.0.jar:file:/var/task/lib/aws-lambda-java-tests-1.1.1.jar:file:/var/task/lib/aws-xray-recorder-sdk-core-2.11.2.jar:file:/var/task/lib/checker-compat-qual-2.5.5.jar:file:/var/task/lib/commons-codec-1.15.jar:file:/var/task/lib/commons-lang3-3.12.0.jar:file:/var/task/lib/commons-logging-1.2.jar:file:/var/task/lib/dagger-2.43.2.jar:file:/var/task/lib/datadog-lambda-java-1.4.5.jar:file:/var/task/lib/dd-trace-api-0.90.0.jar:file:/var/task/lib/error_prone_annotations-2.9.0.jar:file:/var/task/lib/failureaccess-1.0.1.jar:file:/var/task/lib/grpc-api-1.42.2.jar:file:/var/task/lib/grpc-context-1.42.2.jar:file:/var/task/lib/grpc-core-1.42.2.jar:file:/var/task/lib/grpc-netty-1.42.2.jar:file:/var/task/lib/grpc-protobuf-1.42.2.jar:file:/var/task/lib/grpc-protobuf-lite-1.42.2.jar:file:/var/task/lib/grpc-stub-1.42.2.jar:file:/var/task/lib/gson-2.8.9.jar:file:/var/task/lib/guava-30.1.1-android.jar:file:/var/task/lib/httpclient-4.5.13.jar:file:/var/task/lib/httpcore-4.4.13.jar:file:/var/task/lib/ib_business-7.1.0.jar:file:/var/task/lib/ib_content-5.13.0.jar:file:/var/task/lib/ib_core-5.2.3.jar:file:/var/task/lib/ib_shopping-8.1.0.jar:file:/var/task/lib/ion-java-1.0.2.jar:file:/var/task/lib/ipn-purchase-client-1.0-SNAPSHOT.jar:file:/var/task/lib/j2objc-annotations-1.3.jar:file:/var/task/lib/jackson-annotations-2.12.6.jar:file:/var/task/lib/jackson-core-2.12.6.jar:file:/var/task/lib/jackson-databind-2.12.6.1.jar:file:/var/task/lib/jackson-dataformat-cbor-2.12.6.jar:file:/var/task/lib/java-dogstatsd-client-3.0.0.jar:file:/var/task/lib/javax.annotation-api-1.3.2.jar:file:/var/task/lib/javax.inject-1.jar:file:/var/task/lib/jffi-1.2.23-native.jar:file:/var/task/lib/jffi-1.2.23.jar:file:/var/task/lib/jmespath-java-1.12.228.jar:file:/var/task/lib/jnr-a64asm-1.0.0.jar:file:/var/task/lib/jnr-constants-0.9.17.jar:file:/var/task/lib/jnr-enxio-0.30.jar:file:/var/task/lib/jnr-ffi-2.1.16.jar:file:/var/task/lib/jnr-posix-3.0.61.jar:file:/var/task/lib/jnr-unixsocket-0.36.jar:file:/var/task/lib/jnr-x86asm-1.0.2.jar:file:/var/task/lib/joda-time-2.8.1.jar:file:/var/task/lib/json-20220320.jar:file:/var/task/lib/jsr305-3.0.2.jar:file:/var/task/lib/junit-jupiter-api-5.7.0.jar:file:/var/task/lib/junit-jupiter-engine-5.7.0.jar:file:/var/task/lib/junit-jupiter-params-5.7.0.jar:file:/var/task/lib/junit-platform-commons-1.7.0.jar:file:/var/task/lib/junit-platform-engine-1.7.0.jar:file:/var/task/lib/kotlin-stdlib-1.4.10.jar:file:/var/task/lib/kotlin-stdlib-common-1.4.10.jar:file:/var/task/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:file:/var/task/lib/log4j-api-2.17.0.jar:file:/var/task/lib/log4j-core-2.17.0.jar:file:/var/task/lib/log4j-slf4j18-impl-2.17.0.jar:file:/var/task/lib/netty-buffer-4.1.77.Final.jar:file:/var/task/lib/netty-codec-4.1.77.Final.jar:file:/var/task/lib/netty-codec-http-4.1.77.Final.jar:file:/var/task/lib/netty-codec-http2-4.1.63.Final.jar:file:/var/task/lib/netty-codec-socks-4.1.63.Final.jar:file:/var/task/lib/netty-common-4.1.77.Final.jar:file:/var/task/lib/netty-handler-4.1.77.Final.jar:file:/var/task/lib/netty-handler-proxy-4.1.63.Final.jar:file:/var/task/lib/netty-resolver-4.1.77.Final.jar:file:/var/task/lib/netty-transport-4.1.77.Final.jar:file:/var/task/lib/okhttp-4.9.2.jar:file:/var/task/lib/okio-jvm-2.8.0.jar:file:/var/task/lib/opentest4j-1.2.0.jar:file:/var/task/lib/opentracing-api-0.33.0.jar:file:/var/task/lib/opentracing-noop-0.33.0.jar:file:/var/task/lib/opentracing-util-0.33.0.jar:file:/var/task/lib/perfmark-api-0.23.0.jar:file:/var/task/lib/proto-google-common-protos-2.0.1.jar:file:/var/task/lib/protobuf-java-3.18.2.jar:file:/var/task/lib/protobuf-java-util-3.15.6.jar:file:/var/task/lib/slf4j-api-1.8.0-beta4.jar:file:/var/task/lib/transaction-history-7.1.0.jar

END RequestId: 46277f6b-7880-4474-88ce-e386e6921eb9
REPORT RequestId: 46277f6b-7880-4474-88ce-e386e6921eb9  Init Duration: 0.13 ms  Duration: 1092.39 ms    Billed Duration: 1093 ms    Memory Size: 320 MB Max Memory Used: 320 MB 
{"errorMessage":"Error loading method handleRequest on class com.my.fully.qualified.package.MyLambdaFunction","errorType":"java.lang.NoClassDefFoundError"}2022-08-24 11:24:47,912 | Cleaning all decompressed code dirs
2022-08-24 11:24:47,912 | Sending Telemetry: {'metrics': [{'commandRun': {'requestId': '515280f8-1b8f-4b62-be3e-dec09e263503', 'installationId': 'f4192455-a93b-4e41-a55f-0f373812337e', 'sessionId': '35191f22-b5f2-4f0a-9d5a-52dc43ddddfc', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.8.13', 'samcliVersion': '1.55.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam local invoke', 'metricSpecificAttributes': {'projectType': 'CFN'}, 'duration': 3475, 'exitReason': 'success', 'exitCode': 0}}]}
2022-08-24 11:24:48,352 | Telemetry response: 500
2022-08-24 11:24:48,352 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2022-08-24 11:24:48,352 | Sending Telemetry: {'metrics': [{'runtimeMetric': {'requestId': 'dd677875-7fa8-4f8b-a3ff-6970d6701ff3', 'installationId': 'f4192455-a93b-4e41-a55f-0f373812337e', 'sessionId': '35191f22-b5f2-4f0a-9d5a-52dc43ddddfc', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.8.13', 'samcliVersion': '1.55.0', 'runtimes': ['java11']}}]}
2022-08-24 11:24:48,534 | Telemetry response: 500

### Expected result:
<!-- Describe what you expected. -->
Dependencies appear to be on the classpath so the function should execute without failing with java errors/exceptions.

### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

1. OS: mac Monteray 12.5.1
2. `sam --version`: 1.55.0
3. AWS region: us-east-1

`Add --debug flag to command you are running`
jfuss commented 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.

bguyza commented 2 years ago

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?

jfuss commented 2 years ago

@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.

bguyza commented 2 years ago

@jfuss I figured it out. The size of my function (dependencies to be precise) was too large. Trying to call update-function-codevia 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.