serverless-image-resizer-service
serverless-image-resizer-service copied to clipboard
x-amazon-apigateway-integration not added to swagger
trafficstars
I've followed your tutorial, and I've gotten the Lambda function to work when testing and when visiting: https://img2.cloudfront.net/prod/resize/500x500/bilde2.jpg - the image is produced in S3 but I get redirected to img2.execute-api.eu-west-1.amazonaws.com/prod/resize/500x500/img-resized.s3-website-eu-west-1.amazonaws.com/500x500/bilde2.jpg
Also: the following is not generated in my Swagger file
"x-amazon-apigateway-integration": {
"responses": {
"default": {
"statusCode": "302",
"responseParameters": {
"method.response.header.Location": "integration.response.body.location"
}
}
},
"requestTemplates": {
"application/json": "{ \"size\": \"$input.params('size')\", \"image\": \"$input.params('image')\" }"
},
"uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:150130051736:function:resize/invocations",
"httpMethod": "POST",
"type": "aws"
}
}
After the image is generated I can se it in a browser at: http://img1.cloudfront.net/500x500/bilde2.jpg
Any hints to what's going on ?