Closed RyanJarv closed 2 years ago
could you include your template?
The second half likely involves https://github.com/aws-cloudformation/cfn-python-lint/issues/1219 since no Resource Specfications have been released for weeks
The first half may be fixed by upgrading SAM:
pip3 install aws-sam-translator --upgrade
fixes for the second half just merged in yesterday, so the second half will be fixed in the next release
This template is working with the newest version of the sam translator. If you leave that value out you will get the error that you have specified but that error is coming from https://github.com/aws/serverless-application-model if you believe it shouldn't exist we may need to create an issue there.
Transform: AWS::Serverless-2016-10-31
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
ImageUri: 123456789.dkr.ecr.region.amazonaws.suffix/myimage:latest
ImageConfig:
Command:
- "app.lambda_handler"
EntryPoint:
- "entrypoint1"
WorkingDirectory: "workDir"
v0.44.2 is out and includes the 2nd half fixes that @PatMyron mentioned.
@kddejong - I think this needs to be re-opened. The original issue is still present. It was fixed in sam validate
here. From that fix, here is a test that will fail cfn-lint.
The problem is that cfn-lint passes the template as-is to the transalator, but sam will deploy an image to ECR then add an ImageUri
before translating.
cfn-lint 0.43.0
This is a feature request for supporting docker lambda sam templates.
Please provide as much information as possible:
Running on the template.yaml in the base directory outputs the following:
Running on the packaged template at
.aws-sam/build/template.yaml
produces the following: