https://serverless-stack.com/ logo
#sst
Title
# sst
p

Phil Astle

11/25/2021, 6:45 PM
Hi all. I've just started getting this error back when trying to deploy/redeploy my scripts:
Copy code
phil-debug-dentr-sst-after-deploy | UPDATE_FAILED | Custom::SSTScript | PostDeploymentScriptResourceE4FC8D7B Response object is too long
Any help much appreciated!
f

Frank

11/25/2021, 6:52 PM
Hey @Phil Astle, do you know if the Script succeeded or failed to run?
p

Phil Astle

11/25/2021, 6:53 PM
Here's the full deployment bit for it:
Copy code
phil-debug-dentr-sst-after-deploy | UPDATE_IN_PROGRESS | AWS::Lambda::Function | PostDeploymentonCreateFunctionB24F2071 
phil-debug-dentr-sst-after-deploy | UPDATE_IN_PROGRESS | AWS::Lambda::Function | PostDeploymentonUpdateFunctionF27A29C2 
phil-debug-dentr-sst-after-deploy | UPDATE_COMPLETE | AWS::Lambda::Function | PostDeploymentonUpdateFunctionF27A29C2 
phil-debug-dentr-sst-after-deploy | UPDATE_COMPLETE | AWS::Lambda::Function | PostDeploymentonCreateFunctionB24F2071 
phil-debug-dentr-sst-after-deploy | UPDATE_IN_PROGRESS | Custom::SSTScript | PostDeploymentScriptResourceE4FC8D7B 
phil-debug-dentr-sst-after-deploy | UPDATE_FAILED | Custom::SSTScript | PostDeploymentScriptResourceE4FC8D7B Response object is too long.
phil-debug-dentr-sst-after-deploy | UPDATE_ROLLBACK_IN_PROGRESS | Custom::SSTScript | PostDeploymentScriptResourceE4FC8D7B 
phil-debug-dentr-sst-after-deploy | UPDATE_ROLLBACK_FAILED | Custom::SSTScript | PostDeploymentScriptResourceE4FC8D7B 
phil-debug-dentr-sst-after-deploy | UPDATE_FAILED | AWS::CloudFormation::Stack | phil-debug-dentr-sst-after-deploy
I don't think it got as far as updating the script to let it run
The script runs some update SQL which hasn't appeared in the DB either, so I'm pretty sure it hasn't
I've been making changes to them all day and it's only been in the last few minutes I've started seeing this.
f

Frank

11/25/2021, 7:01 PM
Yeah, if I were to take a wild guess, it might be the
updateFunction
failed to run, and the custom resource tried to return the full error message in the response, and went over the length limit.
p

Phil Astle

11/25/2021, 7:03 PM
Hmm... What sorts of things could cause an update to fail?
f

Frank

11/25/2021, 7:04 PM
To verify this, could you try this: 1. go to Lambda console and look for a Lambda with
ScriptHandler
in its name 2. go to CloudWatch console and search for the log group with the Lambda function name 3. go to the latest log stream in the log group And the logs should tell us a thing or two.
p

Phil Astle

11/25/2021, 7:04 PM
I'll look now
Ahah!
An unterminated string literal apparently, so it tried to return the entire SQL command text.
Could you add truncation to the payload field to ensure we get at least something out? The error was mentioned in the first 40 characters or so, so I wouldn't have needed all of it
f

Frank

11/25/2021, 7:10 PM
For sure!
Can you paste the log here? Let me try to reproduce it on my end.
p

Phil Astle

11/25/2021, 7:13 PM
You free for a quick call + screen share to show me which bit you want?
p

Phil Astle

11/25/2021, 7:26 PM
Found the missing single quote - it was there before so I must have been heavy-handed on the keyboard at some point!
That last deploy that failed has left it in the state where I need to go to cloud formation
Copy code
update-stack and create-change-set cannot be performed on stack with UPDATE_ROLLBACK_FAILED resource during disable-rollback. Please try continue-update-rollback API to fix resources first or rollback the stack with Rollback-Stack API.
So now I have to go to cloudformation, refresh the page and then click the rollback button that magically appears
f

Frank

11/25/2021, 8:02 PM
Thanks Phil. I will take a look!
p

Phil Astle

11/25/2021, 8:03 PM
No problem - hope it helps 🙂
f

Frank

12/01/2021, 6:04 PM
Hey @Phil Astle v0.53.3 fixed both the
Response object too long
and the rollback issue.
p

Phil Astle

12/01/2021, 6:14 PM
Cool. I'll make sure to upgrade to that before I mess up my next big SQL effort!