Hello, I’m using `Script` inside my db stack to ru...
# help
e
Hello, I’m using
Script
inside my db stack to run a migration when the construct is deployed. When I deploy or remove the stack using
sst start
/
sst remove
it takes too much time. For example when I run a remove, CloudFormation takes about 40 minutes to switch from the status
MigrationScriptonCreateFunction DELETE_IN_PROGRESS
to the
MigrationScriptonCreateFunction DELETE_COMPLETE
. This seems to happen only with Lambda functions managed by
Script
, other Lambdas delete smoothly.
t
this usually is an indicator the script is erroring when being brought down
it's really annoying but cfn does not deal with custom resource errors gracefully, it waits for some sort of large timeout
f
@Edoardo if you go to CloudWatch and find the log group for the Script’s Lambda function. Do you see errors in there?
e
I also thought the problem could be the script erroring, but I can’t figure out why the script is called also during the removal… 🙂 (I’m talking about
onCreate
script)
@Frank no error within CloudWatch, neither within CloudTrails events…