I can’t delete a single Lambda function without ge...
# help
s
I can’t delete a single Lambda function without getting this:
Copy code
dev-microservices-core | UPDATE_ROLLBACK_IN_PROGRESS | AWS::CloudFormation::Stack | dev-microservices-core Export dev-microservices-core:ExportsOutputRefUploadBucketB0FBA0377290D88A cannot be deleted as it is in use by dev-microservices-media-processor
there’s some weird dependency thing going on here and I don’t understand it.
I’m trying to “unwind” it in small pieces. this is the code (I just commented out permissions first, then ran
yarn start
)
Copy code
videoUpdateRule.addTarget(
      new eventsTargets.LambdaFunction(
        new sst.Function(this, 'VideoUpdateHandlerFunc', {
          functionName: `${this.stackName}-videoProcUpdateHandler`,
          srcPath,
          handler: `${handlerPrefix}/video-process-update.main`,
          environment: {
            GRAPHQL_ENDPOINT_URL: props!.appSyncApi.url,
            STAGING_BUCKET: props!.uploadBucket.bucketName,
          },
          // permissions: [
          //   [props!.appSyncApi.graphqlApi, 'grantMutation'],
          //   [props!.uploadBucket.s3Bucket, 'grantDelete'],
          //   [props!.storageBucket.s3Bucket, 'grantRead'],
          // ],
        })
      )
    );
that deployed ok.. permissions removed. now I commented out the
environment
block. and that’s where I get that error
it’s like.. with the MediaProcessor stack referencing the
uploadBucket
which was created in the Core stack, an export is created in Core. and then I try to remove the reference to that bucket in MediaProcessor, so it has to delete the export from Core.. which says it can’t because MediaProcessor depends on it. but I’m literally trying to remove that dependency 🤯
or..actually, there are other refs to that bucket in Lambda permissions
and somehow me removing just that one env var, it’s trying to delete the export in the Core stack
I’ve commented out every reference to
uploadBucket
in the MediaProcessor stack, and i still can’t deploy 😕
nvm. had to just remove the MediaProcessor stack entirely, and re-deploy