Sam sync: Unable to upload artifact referenced by ImageUri parameter. Internal Server Error ("invalid reference format")
See original GitHub issueDescription:
Trying out sam sync for the first time and I get the following error.
Error: Unable to upload artifact amcconsumerfunctionclj:v1 referenced by ImageUri parameter of AmcConsumerFunctionClj resource.
500 Server Error: Internal Server Error ("invalid reference format")
Never had this problem with build or deploy. I don’t know if this is a bug or a usage mistake on my part.
Steps to reproduce:
template.yml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: 'Example basic lambda using `holy-lambda` micro library'
Parameters:
Timeout:
Type: Number
Default: 900
MemorySize:
Type: Number
Default: 512
Entrypoint:
Type: String
Default: com.revivemedia.amc-utility.core
Env:
Type: String
Default: test
Globals:
Function:
Timeout:
Ref: Timeout
MemorySize:
Ref: MemorySize
Environment:
Variables:
HL_ENTRYPOINT:
Ref: Entrypoint
Resources:
AmcConsumerFunctionClj:
Type: AWS::Serverless::Function
Properties:
FunctionName:
Fn::Sub: AmcConsumerFunctionClj-${Env}
PackageType: Image
Events:
MySQSEvent:
Type: SQS
Properties:
Queue: arn:aws:sqs:us-east-1:432030313907:amc.fifo
BatchSize: 10
ImageUri: amcconsumerfunctionclj:v1
Metadata:
DockerContext: .
DockerTag: v1
Dockerfile: AmcConsumerDockerfile
SamResourceId: AmcConsumerFunctionClj
AmcRequestFunctionClj:
Type: AWS::Serverless::Function
Properties:
FunctionName:
Fn::Sub: AmcRequestFunctionClj-${Env}
PackageType: Image
Events:
HelloEvent:
Type: HttpApi
Properties:
ApiId:
Ref: ServerlessHttpApi
Path: /
Method: GET
ImageUri: amcrequestfunctionclj:v1
Metadata:
DockerContext: .
DockerTag: v1
Dockerfile: AmcRequestDockerfile
SamResourceId: AmcRequestFunctionClj
ServerlessHttpApi:
Type: AWS::Serverless::HttpApi
DeletionPolicy: Retain
Properties:
StageName: Prod
AmcExecuteFunctionClj:
Type: AWS::Serverless::Function
Properties:
FunctionName:
Fn::Sub: AmcExecuteFunctionClj-${Env}
PackageType: Image
ImageUri: amcexecutefunctionclj:v1
Metadata:
DockerContext: .
DockerTag: v1
Dockerfile: AmcExecuteDockerfile
SamResourceId: AmcExecuteFunctionClj
Outputs:
ExampleLambdaEndpoint:
Description: Endpoint for ExampleLambdaFunction
Value:
Fn::Sub: https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com
Observed result:
sam sync --stack-name amc-test --debug
nick@Nicks-MacBook-Pro-2 amc-utility % sam sync --stack-name amc-test --debug
2022-04-01 12:42:23,929 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2022-04-01 12:42:23,934 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2022-04-01 12:42:23,935 | Sending Telemetry: {'metrics': [{'templateWarning': {'requestId': 'f1cc66cc-1a0b-4370-8ac6-c233e8cd49c0', 'installationId': '02f60e11-0f4a-47b0-8710-0ebfa6017499', 'sessionId': '2f3bfee9-56f4-4c92-9e7d-280ff373aaa8', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.8.13', 'samcliVersion': '1.43.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'warningName': 'CodeDeployWarning', 'warningCount': 0}}]}
2022-04-01 12:42:24,292 | Telemetry response: 200
2022-04-01 12:42:24,293 | Sending Telemetry: {'metrics': [{'templateWarning': {'requestId': '2304cff4-9241-4150-9931-657d392a9f72', 'installationId': '02f60e11-0f4a-47b0-8710-0ebfa6017499', 'sessionId': '2f3bfee9-56f4-4c92-9e7d-280ff373aaa8', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.8.13', 'samcliVersion': '1.43.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'warningName': 'CodeDeployConditionWarning', 'warningCount': 0}}]}
2022-04-01 12:42:24,514 | Telemetry response: 200
2022-04-01 12:42:24,514 | Using config file: samconfig.toml, config environment: default
2022-04-01 12:42:24,514 | Expand command line arguments to:
2022-04-01 12:42:24,514 | --template_file=/Users/nick/code/amc-utility/template.yml --stack_name=amc-test --dependency_layer --capabilities=('CAPABILITY_NAMED_IAM', 'CAPABILITY_AUTO_EXPAND')
Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-jel7bww4wmyx
Default capabilities applied: ('CAPABILITY_NAMED_IAM', 'CAPABILITY_AUTO_EXPAND')
To override with customized capabilities, use --capabilities flag or set it in samconfig.toml
2022-04-01 12:42:25,529 | Using build directory as .aws-sam/auto-dependency-layer
2022-04-01 12:42:25,529 | Using build directory as .aws-sam/auto-dependency-layer
This feature is currently in beta. Visit the docs page to learn more about the AWS Beta terms https://aws.amazon.com/service-terms/.
The SAM CLI will use the AWS Lambda, Amazon API Gateway, and AWS StepFunctions APIs to upload your code without
performing a CloudFormation deployment. This will cause drift in your CloudFormation stack.
**The sync command should only be used against a development stack**.
Confirm that you are synchronizing a development stack and want to turn on beta features.
Enter Y to proceed with the command, or enter N to cancel:
[y/N]: y
2022-04-01 12:42:27,369 |
Experimental features are enabled for this session.
Visit the docs page to learn more about the AWS Beta terms https://aws.amazon.com/service-terms/.
2022-04-01 12:42:27,384 | Collected default values for parameters: {'Timeout': 900, 'MemorySize': 512, 'Entrypoint': 'com.revivemedia.amc-utility.core', 'Env': 'test'}
2022-04-01 12:42:27,401 | There is no customer defined id or cdk path defined for resource AmcConsumerFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,401 | There is no customer defined id or cdk path defined for resource AmcRequestFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,401 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,401 | There is no customer defined id or cdk path defined for resource AmcExecuteFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,402 | 4 stacks found in the template
2022-04-01 12:42:27,402 | Collected default values for parameters: {'Timeout': 900, 'MemorySize': 512, 'Entrypoint': 'com.revivemedia.amc-utility.core', 'Env': 'test'}
2022-04-01 12:42:27,411 | There is no customer defined id or cdk path defined for resource AmcConsumerFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,411 | There is no customer defined id or cdk path defined for resource AmcRequestFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,411 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,411 | There is no customer defined id or cdk path defined for resource AmcExecuteFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,412 | 4 resources found in the stack
2022-04-01 12:42:27,412 | Collected default values for parameters: {'Timeout': 900, 'MemorySize': 512, 'Entrypoint': 'com.revivemedia.amc-utility.core', 'Env': 'test'}
2022-04-01 12:42:27,420 | There is no customer defined id or cdk path defined for resource AmcConsumerFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,420 | There is no customer defined id or cdk path defined for resource AmcRequestFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,420 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,420 | There is no customer defined id or cdk path defined for resource AmcExecuteFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,420 | Found Serverless function with name='AmcConsumerFunctionClj' and ImageUri='None'
2022-04-01 12:42:27,420 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:27,420 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:27,420 | Found Serverless function with name='AmcRequestFunctionClj' and ImageUri='None'
2022-04-01 12:42:27,420 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:27,420 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:27,420 | Found Serverless function with name='AmcExecuteFunctionClj' and ImageUri='None'
2022-04-01 12:42:27,420 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:27,420 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:27,420 | Collected default values for parameters: {'Timeout': 900, 'MemorySize': 512, 'Entrypoint': 'com.revivemedia.amc-utility.core', 'Env': 'test'}
2022-04-01 12:42:27,428 | There is no customer defined id or cdk path defined for resource AmcConsumerFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,428 | There is no customer defined id or cdk path defined for resource AmcRequestFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,428 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,428 | There is no customer defined id or cdk path defined for resource AmcExecuteFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,430 | Executing the build using build context.
2022-04-01 12:42:27,436 | Collected default values for parameters: {'Timeout': 900, 'MemorySize': 512, 'Entrypoint': 'com.revivemedia.amc-utility.core', 'Env': 'test'}
2022-04-01 12:42:27,442 | There is no customer defined id or cdk path defined for resource AmcConsumerFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,442 | There is no customer defined id or cdk path defined for resource AmcRequestFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,442 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,442 | There is no customer defined id or cdk path defined for resource AmcExecuteFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:27,443 | Your template contains a resource with logical ID "ServerlessHttpApi", which is a reserved logical ID in AWS SAM. It could result in unexpected behaviors and is not recommended.
2022-04-01 12:42:27,443 | Instantiating build definitions
2022-04-01 12:42:27,448 | Unique function build definition found, adding as new (Function Build Definition: BuildDefinition(None, /Users/nick/code/amc-utility, Image, , 649313d9-ddc1-4458-895e-55e055fec1ec, {'Dockerfile': 'AmcConsumerDockerfile', 'DockerContext': '/Users/nick/code/amc-utility', 'DockerTag': 'v1'}, {}, x86_64, []), Function: Function(function_id='AmcConsumerFunctionClj', name='AmcConsumerFunctionClj', functionname='AmcConsumerFunctionClj-test', runtime=None, memory=512, timeout=900, handler=None, imageuri=None, packagetype='Image', imageconfig=None, codeuri='/Users/nick/code/amc-utility', environment={'Variables': {'HL_ENTRYPOINT': 'com.revivemedia.amc-utility.core'}}, rolearn=None, layers=[], events={'MySQSEvent': {'Type': 'SQS', 'Properties': {'Queue': 'arn:aws:sqs:us-east-1:432030313907:amc.fifo', 'BatchSize': 10}}}, metadata={'Dockerfile': 'AmcConsumerDockerfile', 'DockerContext': '/Users/nick/code/amc-utility', 'DockerTag': 'v1', 'SamResourceId': 'AmcConsumerFunctionClj'}, inlinecode=None, codesign_config_arn=None, architectures=None, stack_path=''))
2022-04-01 12:42:27,448 | Unique function build definition found, adding as new (Function Build Definition: BuildDefinition(None, /Users/nick/code/amc-utility, Image, , bbfd217b-e896-4a3f-9f91-f8390948fa3c, {'Dockerfile': 'AmcRequestDockerfile', 'DockerContext': '/Users/nick/code/amc-utility', 'DockerTag': 'v1'}, {}, x86_64, []), Function: Function(function_id='AmcRequestFunctionClj', name='AmcRequestFunctionClj', functionname='AmcRequestFunctionClj-test', runtime=None, memory=512, timeout=900, handler=None, imageuri=None, packagetype='Image', imageconfig=None, codeuri='/Users/nick/code/amc-utility', environment={'Variables': {'HL_ENTRYPOINT': 'com.revivemedia.amc-utility.core'}}, rolearn=None, layers=[], events={'HelloEvent': {'Type': 'HttpApi', 'Properties': {'ApiId': 'ServerlessHttpApi', 'Path': '/', 'Method': 'GET'}}}, metadata={'Dockerfile': 'AmcRequestDockerfile', 'DockerContext': '/Users/nick/code/amc-utility', 'DockerTag': 'v1', 'SamResourceId': 'AmcRequestFunctionClj'}, inlinecode=None, codesign_config_arn=None, architectures=None, stack_path=''))
2022-04-01 12:42:27,448 | Unique function build definition found, adding as new (Function Build Definition: BuildDefinition(None, /Users/nick/code/amc-utility, Image, , 0dca91f9-0e25-41a0-a00e-bf07358ea472, {'Dockerfile': 'AmcExecuteDockerfile', 'DockerContext': '/Users/nick/code/amc-utility', 'DockerTag': 'v1'}, {}, x86_64, []), Function: Function(function_id='AmcExecuteFunctionClj', name='AmcExecuteFunctionClj', functionname='AmcExecuteFunctionClj-test', runtime=None, memory=512, timeout=900, handler=None, imageuri=None, packagetype='Image', imageconfig=None, codeuri='/Users/nick/code/amc-utility', environment={'Variables': {'HL_ENTRYPOINT': 'com.revivemedia.amc-utility.core'}}, rolearn=None, layers=[], events=None, metadata={'Dockerfile': 'AmcExecuteDockerfile', 'DockerContext': '/Users/nick/code/amc-utility', 'DockerTag': 'v1', 'SamResourceId': 'AmcExecuteFunctionClj'}, inlinecode=None, codesign_config_arn=None, architectures=None, stack_path=''))
2022-04-01 12:42:27,449 | Async execution started
2022-04-01 12:42:27,449 | Invoking function functools.partial(<bound method CachedOrIncrementalBuildStrategyWrapper.build_single_function_definition of <samcli.lib.build.build_strategy.CachedOrIncrementalBuildStrategyWrapper object at 0x104349940>>, <samcli.lib.build.build_graph.FunctionBuildDefinition object at 0x104341850>)
2022-04-01 12:42:27,449 | Running incremental build for runtime None for build definition 649313d9-ddc1-4458-895e-55e055fec1ec
2022-04-01 12:42:27,449 | Invoking function functools.partial(<bound method CachedOrIncrementalBuildStrategyWrapper.build_single_function_definition of <samcli.lib.build.build_strategy.CachedOrIncrementalBuildStrategyWrapper object at 0x104349940>>, <samcli.lib.build.build_graph.FunctionBuildDefinition object at 0x104341fd0>)
2022-04-01 12:42:27,449 | Building codeuri: /Users/nick/code/amc-utility runtime: None metadata: {'Dockerfile': 'AmcConsumerDockerfile', 'DockerContext': '/Users/nick/code/amc-utility', 'DockerTag': 'v1'} architecture: x86_64 functions: ['AmcConsumerFunctionClj']
2022-04-01 12:42:27,449 | Building to following folder /Users/nick/code/amc-utility/.aws-sam/auto-dependency-layer/AmcConsumerFunctionClj
2022-04-01 12:42:27,449 | Running incremental build for runtime None for build definition bbfd217b-e896-4a3f-9f91-f8390948fa3c
2022-04-01 12:42:27,449 | Building image for AmcConsumerFunctionClj function
2022-04-01 12:42:27,449 | Invoking function functools.partial(<bound method CachedOrIncrementalBuildStrategyWrapper.build_single_function_definition of <samcli.lib.build.build_strategy.CachedOrIncrementalBuildStrategyWrapper object at 0x104349940>>, <samcli.lib.build.build_graph.FunctionBuildDefinition object at 0x10435d430>)
2022-04-01 12:42:27,449 | Building codeuri: /Users/nick/code/amc-utility runtime: None metadata: {'Dockerfile': 'AmcRequestDockerfile', 'DockerContext': '/Users/nick/code/amc-utility', 'DockerTag': 'v1'} architecture: x86_64 functions: ['AmcRequestFunctionClj']
2022-04-01 12:42:27,449 | Running incremental build for runtime None for build definition 0dca91f9-0e25-41a0-a00e-bf07358ea472
2022-04-01 12:42:27,449 | Building to following folder /Users/nick/code/amc-utility/.aws-sam/auto-dependency-layer/AmcRequestFunctionClj
2022-04-01 12:42:27,449 | Waiting for async results
2022-04-01 12:42:27,450 | Building codeuri: /Users/nick/code/amc-utility runtime: None metadata: {'Dockerfile': 'AmcExecuteDockerfile', 'DockerContext': '/Users/nick/code/amc-utility', 'DockerTag': 'v1'} architecture: x86_64 functions: ['AmcExecuteFunctionClj']
2022-04-01 12:42:27,450 | Building image for AmcRequestFunctionClj function
2022-04-01 12:42:27,450 | Building to following folder /Users/nick/code/amc-utility/.aws-sam/auto-dependency-layer/AmcExecuteFunctionClj
2022-04-01 12:42:27,450 | Building image for AmcExecuteFunctionClj function
2022-04-01 12:42:27,459 | Setting DockerBuildArgs: {} for AmcConsumerFunctionClj function
2022-04-01 12:42:27,472 | Setting DockerBuildArgs: {} for AmcRequestFunctionClj function
2022-04-01 12:42:27,472 | Setting DockerBuildArgs: {} for AmcExecuteFunctionClj function
Step 1/4 : FROM openjdk:latest
---> 15bbbf63e09d
Step 2/4 : MAINTAINER Karol Wójcik <karol.wojcik@tuta.io>
---> Using cache
---> e1984a62bbbc
Step 3/4 : ADD .holy-lambda/build/output.jar output.jar
Step 1/4 : FROM openjdk:latest
---> 15bbbf63e09d
Step 2/4 : MAINTAINER Karol Wójcik <karol.wojcik@tuta.io>
---> Using cache
---> e1984a62bbbc
Step 3/4 : ADD .holy-lambda/build/output.jar output.jar
---> Using cache
---> 9a7cdb30e30f
Step 4/4 : CMD java -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -jar output.jar "com.revivemedia.amc-utility.core.SubscribeLambda"
---> Using cache
---> 9cac4dd5180f
---> Using cache
---> 9a7cdb30e30f
Step 4/4 : CMD java -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -jar output.jar "com.revivemedia.amc-utility.core.ExecuteWorkflow"
---> Using cache
---> fdbe024e7f68
Successfully built 9cac4dd5180f
Successfully tagged amcconsumerfunctionclj:v1
Successfully built fdbe024e7f68
Successfully tagged amcexecutefunctionclj:v1
Step 1/4 : FROM openjdk:latest
---> 15bbbf63e09d
Step 2/4 : MAINTAINER Karol Wójcik <karol.wojcik@tuta.io>
---> Using cache
---> e1984a62bbbc
Step 3/4 : ADD .holy-lambda/build/output.jar output.jar
---> Using cache
---> 9a7cdb30e30f
Step 4/4 : CMD java -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -jar output.jar "com.revivemedia.amc-utility.core.RequestWorkflow"
---> Using cache
---> ad92c2b7824b
Successfully built ad92c2b7824b
Successfully tagged amcrequestfunctionclj:v1
2022-04-01 12:42:30,424 | Async execution completed
2022-04-01 12:42:30,427 | Collected default values for parameters: {'Timeout': 900, 'MemorySize': 512, 'Entrypoint': 'com.revivemedia.amc-utility.core', 'Env': 'test'}
2022-04-01 12:42:30,434 | There is no customer defined id or cdk path defined for resource AmcConsumerFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,434 | There is no customer defined id or cdk path defined for resource AmcRequestFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,434 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,434 | There is no customer defined id or cdk path defined for resource AmcExecuteFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,434 | There is no customer defined id or cdk path defined for resource AmcConsumerFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,435 | There is no customer defined id or cdk path defined for resource AmcRequestFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,435 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,435 | There is no customer defined id or cdk path defined for resource AmcExecuteFunctionClj, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,435 | Auto creating dependency layer for each function resource into a nested stack
2022-04-01 12:42:30,435 | Collected default values for parameters: {'Timeout': 900, 'MemorySize': 512, 'Entrypoint': 'com.revivemedia.amc-utility.core', 'Env': 'test'}
2022-04-01 12:42:30,443 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcConsumerFunctionClj is AmcConsumerFunctionClj
2022-04-01 12:42:30,443 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcRequestFunctionClj is AmcRequestFunctionClj
2022-04-01 12:42:30,443 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,443 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcExecuteFunctionClj is AmcExecuteFunctionClj
2022-04-01 12:42:30,444 | 4 resources found in the stack
2022-04-01 12:42:30,444 | Collected default values for parameters: {'Timeout': 900, 'MemorySize': 512, 'Entrypoint': 'com.revivemedia.amc-utility.core', 'Env': 'test'}
2022-04-01 12:42:30,454 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcConsumerFunctionClj is AmcConsumerFunctionClj
2022-04-01 12:42:30,454 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcRequestFunctionClj is AmcRequestFunctionClj
2022-04-01 12:42:30,455 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,455 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcExecuteFunctionClj is AmcExecuteFunctionClj
2022-04-01 12:42:30,455 | Found Serverless function with name='AmcConsumerFunctionClj' and ImageUri='amcconsumerfunctionclj:v1'
2022-04-01 12:42:30,456 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:30,456 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:30,456 | Found Serverless function with name='AmcRequestFunctionClj' and ImageUri='amcrequestfunctionclj:v1'
2022-04-01 12:42:30,456 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:30,456 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:30,456 | Found Serverless function with name='AmcExecuteFunctionClj' and ImageUri='amcexecutefunctionclj:v1'
2022-04-01 12:42:30,456 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:30,456 | --base-dir is not presented, adjusting uri . relative to /Users/nick/code/amc-utility/template.yml
2022-04-01 12:42:30,456 | No function has been added for auto dependency layer creation
Build Succeeded
2022-04-01 12:42:30,461 | Executing the packaging using package context.
2022-04-01 12:42:30,467 | Collected default values for parameters: {'Timeout': 900, 'MemorySize': 512, 'Entrypoint': 'com.revivemedia.amc-utility.core', 'Env': 'test'}
2022-04-01 12:42:30,474 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcConsumerFunctionClj is AmcConsumerFunctionClj
2022-04-01 12:42:30,474 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcRequestFunctionClj is AmcRequestFunctionClj
2022-04-01 12:42:30,474 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,474 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcExecuteFunctionClj is AmcExecuteFunctionClj
2022-04-01 12:42:30,475 | 4 stacks found in the template
2022-04-01 12:42:30,520 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcConsumerFunctionClj is AmcConsumerFunctionClj
2022-04-01 12:42:30,520 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcRequestFunctionClj is AmcRequestFunctionClj
2022-04-01 12:42:30,520 | There is no customer defined id or cdk path defined for resource ServerlessHttpApi, so we will use the resource logical id as the resource id
2022-04-01 12:42:30,520 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcExecuteFunctionClj is AmcExecuteFunctionClj
2022-04-01 12:42:30,520 | Sam customer defined id is more priority than other IDs. Customer defined id for resource AmcConsumerFunctionClj is AmcConsumerFunctionClj
2022-04-01 12:42:31,916 | Unable to export
Traceback (most recent call last):
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/docker/api/client.py", line 261, in _raise_for_status
response.raise_for_status()
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.35/images/sha256:9cac4dd5180fda62e9808d95d3cf2202eb2e422c4aae02580be2dd1329874819/tag?tag=amcconsumerfunctionclj-9cac4dd5180f-v1&force=0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/samcli/lib/package/ecr_uploader.py", line 88, in upload
docker_img.tag(repository=repository, tag=_tag)
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/docker/models/images.py", line 122, in tag
return self.client.api.tag(self.id, repository, tag=tag, **kwargs)
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/docker/api/image.py", line 547, in tag
self._raise_for_status(res)
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/docker/api/client.py", line 263, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error: Internal Server Error ("invalid reference format")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/samcli/lib/package/packageable_resources.py", line 273, in export
self.do_export(resource_id, resource_dict, parent_dir)
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/samcli/lib/package/packageable_resources.py", line 286, in do_export
uploaded_url = upload_local_image_artifacts(
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/samcli/lib/package/utils.py", line 118, in upload_local_image_artifacts
return uploader.upload(image_path, resource_id)
File "/opt/homebrew/Cellar/aws-sam-cli/1.43.0/libexec/lib/python3.8/site-packages/samcli/lib/package/ecr_uploader.py", line 101, in upload
raise DockerPushFailedError(msg=str(ex)) from ex
samcli.commands.package.exceptions.DockerPushFailedError: 500 Server Error: Internal Server Error ("invalid reference format")
2022-04-01 12:42:31,918 | Sending Telemetry: {'metrics': [{'commandRunExperimental': {'requestId': 'b5e0cc98-e97b-4a9c-80d5-1d3dcaf128f1', 'installationId': '02f60e11-0f4a-47b0-8710-0ebfa6017499', 'sessionId': '2f3bfee9-56f4-4c92-9e7d-280ff373aaa8', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.8.13', 'samcliVersion': '1.43.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam sync', 'metricSpecificAttributes': {'experimentalAccelerate': True, 'experimentalAll': False, 'experimentalEsbuild': False, 'experimentalMavenScopeAndLayer': False, 'projectType': 'CFN'}, 'duration': 7989, 'exitReason': 'ExportFailedError', 'exitCode': 1}}]}
2022-04-01 12:42:32,101 | Telemetry response: 200
Error: Unable to upload artifact amcconsumerfunctionclj:v1 referenced by ImageUri parameter of AmcConsumerFunctionClj resource.
500 Server Error: Internal Server Error ("invalid reference format")
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: macOS 12.1, M1
sam --version
: SAM CLI, version 1.43.0- AWS region: us-east-1
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
why does sam sync --watch fails due to a ... - Stack Overflow
ExportFailedError: Unable to upload artifact helloworldfunction:python3.9-v2 referenced by ImageUri parameter of HelloWorldFunction resource.
Read more >Issues - GitHub
Error : Unable to upload artifact ./hello_world referenced by CodeUri parameter of HelloWorldFunction resource. My template.yaml file looks like ...
Read more >sam package - AWS Serverless Application Model
This command creates a .zip file of your code and dependencies, and uploads the file to Amazon Simple Storage Service (Amazon S3). AWS...
Read more >Eric Johnson - Noise
This blog covers consuming API Gateway endpoints cross-account. For exposing cross-account resources behind an API Gateway, read this existing blog post.
Read more >AWS SAM CLI Issues running a container-based lambda ...
AWS SAM CLI Issues running a container-based lambda locally. Getting 'Bad Request ("no such image: :rapid-1.18.1: invalid reference format")'.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for reporting the issue. We will look into it.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.