Hi all. I've just started getting this error back...
# sst
p
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
Hey @Phil Astle, do you know if the Script succeeded or failed to run?
p
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
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
Hmm... What sorts of things could cause an update to fail?
f
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
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
For sure!
Can you paste the log here? Let me try to reproduce it on my end.
p
You free for a quick call + screen share to show me which bit you want?
p
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
Thanks Phil. I will take a look!
p
No problem - hope it helps 🙂
f
Hey @Phil Astle v0.53.3 fixed both the
Response object too long
and the rollback issue.
p
Cool. I'll make sure to upgrade to that before I mess up my next big SQL effort!