Closed nathanpalmer closed 5 years ago
Wondering what the child CloudFormation stack error showed. Here's some info on how to find it. http://rubyonjets.com/docs/debugging/cloudformation/
If I dig into the nested CloudFormation I see these two errors
The following resource(s) failed to create: [BasePathMapping].
Failed to create resource. See the details in CloudWatch Log Stream: "2019/05/23/[$LATEST]4dc75b7fe8e342d0bf96ec99aeb14039"
Then jumping deeper into the CloudWatch logs I see this
START RequestId: d207668e-3d3e-444b-9e2f-49101471921a Version: $LATEST
event['RequestType'] Create
event:
{
"RequestType": "Create",
"ServiceToken": "arn:aws:lambda:us-east-1:129282110611:function:NathanPalmer-prod-jets-base-path-20190523075306",
"ResponseURL": "https://cloudformation-custom-resource-response-useast1.s3.amazonaws.com/arn%3Aaws%3Acloudformation%3Aus-east-1%3A129282110611%3Astack/NathanPalmer-prod-ApiDeployment20190523075306-YJ0819O8QR2/9cb45e00-7d51-11e9-b109-0a1b7b252ffe%7CBasePathMapping%7Cec96a4b8-7f57-4791-a655-a25ec6a71eb5?AWSAccessKeyId=AKIA6L7Q4OWT7XTLUBXY&Expires=1558619737&Signature=Sz1P45cTMipUeYFBQh%2FbSYv9v5U%3D",
"StackId": "arn:aws:cloudformation:us-east-1:129282110611:stack/NathanPalmer-prod-ApiDeployment20190523075306-YJ0819O8QR2/9cb45e00-7d51-11e9-b109-0a1b7b252ffe",
"RequestId": "ec96a4b8-7f57-4791-a655-a25ec6a71eb5",
"LogicalResourceId": "BasePathMapping",
"ResourceType": "Custom::BasePathMapping",
"ResourceProperties": {
"ServiceToken": "arn:aws:lambda:us-east-1:129282110611:function:NathanPalmer-prod-jets-base-path-20190523075306"
}
}
context: "#<LambdaContext:0x0000561e09d54620>"
context.log_stream_name "2019/05/23/[$LATEST]4dc75b7fe8e342d0bf96ec99aeb14039"
mimic:
physical_id: PhysicalId
/var/runtime/gems/aws-sdk-core-3.47.0/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call'
/var/runtime/gems/aws-sdk-core-3.47.0/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
/var/runtime/gems/aws-sdk-core-3.47.0/lib/aws-sdk-core/plugins/idempotency_token.rb:17:in `call'
/var/runtime/gems/aws-sdk-core-3.47.0/lib/aws-sdk-core/plugins/param_converter.rb:24:in `call'
/var/runtime/gems/aws-sdk-core-3.47.0/lib/aws-sdk-core/plugins/response_paging.rb:10:in `call'
/var/runtime/gems/aws-sdk-core-3.47.0/lib/seahorse/client/plugins/response_target.rb:23:in `call'
/var/runtime/gems/aws-sdk-core-3.47.0/lib/seahorse/client/request.rb:70:in `send_request'
/var/runtime/gems/aws-sdk-apigateway-1.24.0/lib/aws-sdk-apigateway/client.rb:1413:in `delete_base_path_mapping'
/var/task/handlers/functions/jets/base_path.rb:105:in `delete'
/var/task/handlers/functions/jets/base_path.rb:94:in `update'
/var/task/handlers/functions/jets/base_path.rb:30:in `lambda_handler'
/var/runtime/lib/lambda_handler.rb:24:in `call_handler'
/var/runtime/lib/runtime.rb:42:in `<main>'
RESPONSE BODY:
{
"Status": "FAILED",
"Reason": "See the details in CloudWatch Log Stream: \"2019/05/23/[$LATEST]4dc75b7fe8e342d0bf96ec99aeb14039\"",
"PhysicalResourceId": "PhysicalId",
"StackId": "arn:aws:cloudformation:us-east-1:129282110611:stack/NathanPalmer-prod-ApiDeployment20190523075306-YJ0819O8QR2/9cb45e00-7d51-11e9-b109-0a1b7b252ffe",
"RequestId": "ec96a4b8-7f57-4791-a655-a25ec6a71eb5",
"LogicalResourceId": "BasePathMapping",
"Data": {}
}
status code: 200
headers: {"x-amz-id-2"=>"HRbBH2QkTw4uv/yP0NNvtVzKByC/FloqnQYoi8kbKCEGPIi9h/nae37am7EEVsHcfoeSTHY1bPw=", "x-amz-request-id"=>"E9958730BCFC70E4", "date"=>"Thu, 23 May 2019 11:55:51 GMT", "etag"=>"\"8844e5c6fff8d08059623c22c9f9a50f\"", "content-length"=>"0", "server"=>"AmazonS3", "connection"=>"close"}
body:
END RequestId: d207668e-3d3e-444b-9e2f-49101471921a
Cool. Thanks for the details. This is fixed in #258 Released in v1.9.1
Confirmed. 💯
I just pulled down the latest version(v1.9.2 actually) and it deployed just fine.
Thanks!
Checklist
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/My Environment
Expected Behaviour
I am expecting the deploy to point to the api endpoint using a custom domain.
Current Behavior
I can deploy just fine without the custom domain, but as soon as I add the domain on the CloudFormation fails. I followed the instructions here.
It fails on
BasePathMapping
Step-by-step reproduction instructions
This is a brand new project, no customizations beyond adding a single home controller, the bulma css framework (to package.json) and then the domain customizations.
jets new project
yarn add bulma
jets generate controller home
def index
to homeindex.html.erb
jets deploy production
(works fine)config/environments.production.rb
(see code below)jets deploy production
(fails)Code Sample