Has anyone experienced the above issue with the latest CloudFormation template and the latest release bundle? (lambda.zip)
The bundle includes:
index.js lambda-handler.js node_modules proxy-file.js server.js
CloudFormation configures:
API Gateway Lambda Function CloudFront Distribution
https://github.com/humanmade/tachyon
To me this indicates the object doesn't exist. However, it does and numerous tests can confirm the object is present and publicly available. If I call the api gateway directly and pass the arguments the lambda throws no errors, however, via CloudFront - its almost like its transforming the requested url and breaking the request?
https://my.custom.domain.co.uk/image.jpeg?resize=100,100 - this goes via the CloudFront distribution but the Lambda errors that no such key exists. The image is definitely reachable via the domain name and the path to the image as it loads in the browser without issue. However, passing the resize args it seems to break the function.
{
"errorMessage": "The specified key does not exist.",
"errorType": "NoSuchKey",
"stackTrace": [
"Request.extractError (/var/runtime/node_modules/aws-sdk/lib/services/s3.js:585:35)",
"Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)",
"Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)",
"Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)",
"Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)",
"AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)",
"/var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10",
"Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)",
"Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)",
"Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)"
]
}
- Using the provided CloudFormation template
- Using the provided Tachyon code
- One bucket for the Tachyon code
- One bucket for the images - publicly accessible
- Lambda variables provided for bucket name and region as per guidelines
- DNS Cname pointing the domain at the CloudFront distribution
To me this seems to be an issue with the CloudFront configuration
"errorMessage": "The specified key does not exist.",
"errorType": "NoSuchKey",
"stackTrace": [
"Request.extractError (/var/runtime/node_modules/aws-sdk/lib/services/s3.js:585:35)",
"Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)",
"Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)",
"Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)",
"Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)",
"AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)",
"/var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10",
"Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)",
"Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)",
"Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)"
]
}
Expected outcome is - https://my.custom.domain.co.uk/image.jpeg?resize=100,100 returns the resized image to the browser.
Actual outcome - the Lambda errors with no such key from the aws-sdk
Any guidance would be greatly appreciated.
Thanks