lib/plugins/aws/customResources/resources/s3/handler.js/remove
function remove(event, context) {
  const { Region } = getEnvironment(context);
  const { FunctionName, BucketName } = event.ResourceProperties;

  return removePermission({
    functionName: FunctionName,
    bucketName: BucketName,
    region: Region,
  }).then(() =>
    removeConfiguration({
      region: Region,
      functionName: FunctionName,
      bucketName: BucketName,
    })
  );
}