Daniel Gato
02/18/2022, 6:36 PMDockerImageFunction to a Bucket notification?
I’m getting:
Type 'DockerImageFunction' is not assignable to type 'FunctionDefinition'.
Type 'DockerImageFunction' is missing the following properties from type 'Function': _isLiveDevEnabled, localId, attachPermissions, getConstructMetadata ts(2322)Frank
sst.Bucket only takes sst.Function notifications.Frank
const bucket = new sst.Bucket(...);
const function = // create a DockerImageFunction
bucket.s3Bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(function));Frank
Daniel Gato
02/19/2022, 7:10 PMpermissions: [this.table, this.rds, this.bucket], like we do for the others functions. I wonder if there is a easy way to use that helper and then to get the role.
Currently, we create an sst.Function (that we need and happens to be very similar) and then we set the role role: myOtherSimilarFunction.role and it works wellFrank
permissions: […] syntax is very specific to SST functions. The workaround you did is probably the best way to go.